mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-10 15:14:43 +00:00
efi_loader: parameter checks SetVariable()
Return EFI_INVALID_PARAMETER if the variable name has zero length or the variable has runtime access but not boottime access. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
parent
17416eaff2
commit
c77d8e9d89
1 changed files with 3 additions and 1 deletions
|
@ -430,7 +430,9 @@ efi_status_t EFIAPI efi_set_variable(u16 *variable_name,
|
|||
data_size, data);
|
||||
|
||||
/* TODO: implement APPEND_WRITE */
|
||||
if (!variable_name || !vendor ||
|
||||
if (!variable_name || !*variable_name || !vendor ||
|
||||
((attributes & EFI_VARIABLE_RUNTIME_ACCESS) &&
|
||||
!(attributes & EFI_VARIABLE_BOOTSERVICE_ACCESS)) ||
|
||||
(attributes & EFI_VARIABLE_APPEND_WRITE)) {
|
||||
ret = EFI_INVALID_PARAMETER;
|
||||
goto out;
|
||||
|
|
Loading…
Reference in a new issue