hw/uefi: check access for first variable
When listing variables (via get-next-variable-name) only the names of variables which can be accessed will be returned. That check was missing for the first variable though. Add it. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Message-ID: <20250811130110.820958-3-kraxel@redhat.com>
This commit is contained in:
parent
88e5a28d5a
commit
fc8ee8fe58
1 changed files with 3 additions and 0 deletions
|
|
@ -357,6 +357,9 @@ uefi_vars_mm_get_next_variable(uefi_vars_state *uv, mm_header *mhdr,
|
|||
if (uefi_strlen(name, nv->name_size) == 0) {
|
||||
/* empty string -> first */
|
||||
var = QTAILQ_FIRST(&uv->variables);
|
||||
while (var && !check_access(uv, var)) {
|
||||
var = QTAILQ_NEXT(var, next);
|
||||
}
|
||||
if (!var) {
|
||||
return uefi_vars_mm_error(mhdr, mvar, EFI_NOT_FOUND);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue