dc1eb4a29a
*proven packager hat on* Package maintainer unresponsive. All patches submitted upstream, no response either.
37 lines
1.1 KiB
Diff
37 lines
1.1 KiB
Diff
From 91d4421e96a737650720a6306b91994574f98d7a Mon Sep 17 00:00:00 2001
|
|
From: Lubomir Rintel <lkundrak@v3.sk>
|
|
Date: Wed, 27 Nov 2013 16:59:48 +0100
|
|
Subject: [PATCH 3/4] grub: Fix a crash with kernel line without being preceded
|
|
by title
|
|
|
|
Quite obviously this implies a broken configuration file where a lone kernel
|
|
line is found without ever seeing an entry start, resulting in a NULL
|
|
dereference attempt. Reproducible by running GRUB code against extlinux
|
|
configuration:
|
|
|
|
./grubby --grub -c test/extlinux.1 --default-kernel
|
|
grubby received SIGSEGV! Backtrace (6):
|
|
...
|
|
|
|
Signed-off-by: Lubomir Rintel <lkundrak@v3.sk>
|
|
---
|
|
grubby.c | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/grubby.c b/grubby.c
|
|
index 7010526..b0f95e3 100644
|
|
--- a/grubby.c
|
|
+++ b/grubby.c
|
|
@@ -1174,7 +1174,7 @@ static struct grubConfig * readConfig(const char * inName,
|
|
* lines came earlier in the template, make sure to use LT_HYPER
|
|
* instead of LT_KERNEL now
|
|
*/
|
|
- if (entry->multiboot)
|
|
+ if (entry && entry->multiboot)
|
|
line->type = LT_HYPER;
|
|
|
|
} else if (line->type == LT_MBMODULE) {
|
|
--
|
|
1.8.3.1
|
|
|