Blame SOURCES/0236-efi-fix-GetVariable-return-status-check-in-81ca24a.patch

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