]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
hostdisk: fix crash with NULL device.map
authorAndrei Borzenkov <arvidjaar@gmail.com>
Sun, 17 May 2015 11:16:36 +0000 (14:16 +0300)
committerAndrei Borzenkov <arvidjaar@gmail.com>
Sun, 17 May 2015 11:16:36 +0000 (14:16 +0300)
grub-macbless calls grub_util_biosdisk_init with NULL device.map.

grub-core/kern/emu/hostdisk.c

index a3b00c8f686411642a1e467ae1ad986a6fe5c855..610518d0ca74d94ff4c0e2e5322630c5c739df87 100644 (file)
@@ -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;