From 2498dc7a3aee638215ad47899031496b50633d55 Mon Sep 17 00:00:00 2001 From: Andrei Borzenkov Date: Sun, 17 May 2015 14:16:36 +0300 Subject: [PATCH] hostdisk: fix crash with NULL device.map grub-macbless calls grub_util_biosdisk_init with NULL device.map. --- grub-core/kern/emu/hostdisk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grub-core/kern/emu/hostdisk.c b/grub-core/kern/emu/hostdisk.c index a3b00c8f6..610518d0c 100644 --- a/grub-core/kern/emu/hostdisk.c +++ b/grub-core/kern/emu/hostdisk.c @@ -422,7 +422,7 @@ read_device_map (const char *dev_map) char buf[1024]; /* XXX */ int lineno = 0; - if (dev_map[0] == '\0') + if (!dev_map || dev_map[0] == '\0') { grub_util_info ("no device.map"); return;