Blame SOURCES/0236-efi-fix-GetVariable-return-status-check-in-81ca24a.patch
|
|
f725e3 |
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
|
f725e3 |
From: Ignat Korchagin <ignat@cloudflare.com>
|
|
|
f725e3 |
Date: Fri, 24 Jul 2015 20:46:02 +0300
|
|
|
f725e3 |
Subject: [PATCH] efi: fix GetVariable return status check in 81ca24a
|
|
|
f725e3 |
|
|
|
f725e3 |
GetVariable should return EFI_BUFFER_TOO_SMALL if given buffer of size
|
|
|
f725e3 |
zero; commit incorrectly checked for EFI_SUCCESS.
|
|
|
f725e3 |
---
|
|
|
f725e3 |
grub-core/kern/efi/efi.c | 2 +-
|
|
|
f725e3 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
f725e3 |
|
|
|
f725e3 |
diff --git a/grub-core/kern/efi/efi.c b/grub-core/kern/efi/efi.c
|
|
|
f725e3 |
index 0cd64cdb59e..101307fc71e 100644
|
|
|
f725e3 |
--- a/grub-core/kern/efi/efi.c
|
|
|
f725e3 |
+++ b/grub-core/kern/efi/efi.c
|
|
|
f725e3 |
@@ -243,7 +243,7 @@ grub_efi_get_variable (const char *var, const grub_efi_guid_t *guid,
|
|
|
f725e3 |
|
|
|
f725e3 |
status = efi_call_5 (r->get_variable, var16, guid, NULL, &datasize, NULL);
|
|
|
f725e3 |
|
|
|
f725e3 |
- if (status != GRUB_EFI_SUCCESS || !datasize)
|
|
|
f725e3 |
+ if (status != GRUB_EFI_BUFFER_TOO_SMALL || !datasize)
|
|
|
f725e3 |
{
|
|
|
f725e3 |
grub_free (var16);
|
|
|
f725e3 |
return NULL;
|