ieee1275: NULL pointer dereference in grub_machine_get_bootlocation()
Read from NULL pointer canon in function grub_machine_get_bootlocation(). Function grub_ieee1275_canonicalise_devname() may return NULL. Signed-off-by: Eric Snowberg <eric.snowberg@oracle.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
parent
e2faabacff
commit
5ceb55b7a0
1 changed files with 2 additions and 0 deletions
|
@ -110,6 +110,8 @@ grub_machine_get_bootlocation (char **device, char **path)
|
|||
char *ptr;
|
||||
dev = grub_ieee1275_get_aliasdevname (bootpath);
|
||||
canon = grub_ieee1275_canonicalise_devname (dev);
|
||||
if (! canon)
|
||||
return;
|
||||
ptr = canon + grub_strlen (canon) - 1;
|
||||
while (ptr > canon && (*ptr == ',' || *ptr == ':'))
|
||||
ptr--;
|
||||
|
|
Loading…
Reference in a new issue