mirror of
https://git.proxmox.com/git/grub2
synced 2025-07-27 15:45:30 +00:00
efi: fix GetVariable return status check in 81ca24a
GetVariable should return EFI_BUFFER_TOO_SMALL if given buffer of size zero; commit incorrectly checked for EFI_SUCCESS.
This commit is contained in:
parent
333855c646
commit
d5847bf594
@ -238,7 +238,7 @@ grub_efi_get_variable (const char *var, const grub_efi_guid_t *guid,
|
|||||||
|
|
||||||
status = efi_call_5 (r->get_variable, var16, guid, NULL, &datasize, NULL);
|
status = efi_call_5 (r->get_variable, var16, guid, NULL, &datasize, NULL);
|
||||||
|
|
||||||
if (status != GRUB_EFI_SUCCESS || !datasize)
|
if (status != GRUB_EFI_BUFFER_TOO_SMALL || !datasize)
|
||||||
{
|
{
|
||||||
grub_free (var16);
|
grub_free (var16);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
Loading…
Reference in New Issue
Block a user