mirror of
https://git.proxmox.com/git/grub2
synced 2025-07-22 09:08:16 +00:00
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
@ -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 New Issue
Block a user