hostdisk: fix crash with NULL device.map

grub-macbless calls grub_util_biosdisk_init with NULL device.map.
This commit is contained in:
Andrei Borzenkov 2015-05-17 14:16:36 +03:00
parent 5370dcfdae
commit 2498dc7a3a

View 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;