Blame SOURCES/0197-grub-core-normal-crypto.c-read_crypto_list-Fix-incor.patch

f96e0b
From b3e3387c94fa080342c9dadd32cf83155e4ce85b Mon Sep 17 00:00:00 2001
f96e0b
From: Nickolai Zeldovich <nickolai@csail.mit.edu>
f96e0b
Date: Thu, 7 Mar 2013 08:41:27 +0100
f96e0b
Subject: [PATCH 197/482] 	* grub-core/normal/crypto.c
f96e0b
 (read_crypto_list): Fix incorrect 	OOM check. 	*
f96e0b
 grub-core/normal/term.c (read_terminal_list): Likewise.
f96e0b
f96e0b
---
f96e0b
 ChangeLog                 | 6 ++++++
f96e0b
 grub-core/normal/crypto.c | 2 +-
f96e0b
 grub-core/normal/term.c   | 2 +-
f96e0b
 3 files changed, 8 insertions(+), 2 deletions(-)
f96e0b
f96e0b
diff --git a/ChangeLog b/ChangeLog
f96e0b
index 96527dd..ca3d603 100644
f96e0b
--- a/ChangeLog
f96e0b
+++ b/ChangeLog
f96e0b
@@ -1,3 +1,9 @@
f96e0b
+2013-03-07  Nickolai Zeldovich <nickolai@csail.mit.edu>
f96e0b
+
f96e0b
+	* grub-core/normal/crypto.c (read_crypto_list): Fix incorrect
f96e0b
+	OOM check.
f96e0b
+	* grub-core/normal/term.c (read_terminal_list): Likewise.
f96e0b
+
f96e0b
 2013-03-07  Vladimir Serbinenko  <phcoder@gmail.com>
f96e0b
 
f96e0b
 	Lift up core size limits on some platforms. Fix potential memory
f96e0b
diff --git a/grub-core/normal/crypto.c b/grub-core/normal/crypto.c
f96e0b
index e753dd7..2bfd67c 100644
f96e0b
--- a/grub-core/normal/crypto.c
f96e0b
+++ b/grub-core/normal/crypto.c
f96e0b
@@ -136,7 +136,7 @@ read_crypto_list (const char *prefix)
f96e0b
 	}
f96e0b
       
f96e0b
       cur->name = grub_strdup (name);
f96e0b
-      if (! name)
f96e0b
+      if (! cur->name)
f96e0b
 	{
f96e0b
 	  grub_errno = GRUB_ERR_NONE;
f96e0b
 	  grub_free (cur);
f96e0b
diff --git a/grub-core/normal/term.c b/grub-core/normal/term.c
f96e0b
index ae91071..f89e5d2 100644
f96e0b
--- a/grub-core/normal/term.c
f96e0b
+++ b/grub-core/normal/term.c
f96e0b
@@ -389,7 +389,7 @@ read_terminal_list (const char *prefix)
f96e0b
 	}
f96e0b
       
f96e0b
       cur->name = grub_strdup (name);
f96e0b
-      if (! name)
f96e0b
+      if (! cur->name)
f96e0b
 	{
f96e0b
 	  grub_errno = GRUB_ERR_NONE;
f96e0b
 	  grub_free (cur);
f96e0b
-- 
f96e0b
1.8.2.1
f96e0b