Blame SOURCES/0012-grub-Fix-a-crash-with-kernel-line-without-being-prec.patch

903092
From ae451cb921126aa965abfe79c8716b7367c690de Mon Sep 17 00:00:00 2001
903092
From: Lubomir Rintel <lkundrak@v3.sk>
903092
Date: Wed, 27 Nov 2013 16:59:48 +0100
903092
Subject: [PATCH 12/41] grub: Fix a crash with kernel line without being
903092
 preceded by title
903092
903092
Quite obviously this implies a broken configuration file where a lone kernel
903092
line is found without ever seeing an entry start, resulting in a NULL
903092
dereference attempt. Reproducible by running GRUB code against extlinux
903092
configuration:
903092
903092
./grubby --grub -c test/extlinux.1 --default-kernel
903092
grubby received SIGSEGV!  Backtrace (6):
903092
...
903092
903092
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
903092
---
903092
 grubby.c | 2 +-
903092
 1 file changed, 1 insertion(+), 1 deletion(-)
903092
903092
diff --git a/grubby.c b/grubby.c
903092
index 21c5044..3cded58 100644
903092
--- a/grubby.c
903092
+++ b/grubby.c
903092
@@ -1193,7 +1193,7 @@ static struct grubConfig * readConfig(const char * inName,
903092
 	     * lines came earlier in the template, make sure to use LT_HYPER 
903092
 	     * instead of LT_KERNEL now
903092
 	     */
903092
-	    if (entry->multiboot)
903092
+	    if (entry && entry->multiboot)
903092
 		line->type = LT_HYPER;
903092
 
903092
         } else if (line->type == LT_MBMODULE) {
903092
-- 
903092
2.4.3
903092