mirror of
https://git.proxmox.com/git/grub2
synced 2025-08-15 12:17:34 +00:00
setup: fix NULL pointer dereference
Check return value of grub_guess_root_devices Found by: Coverity scan. CID: 73638, 73751
This commit is contained in:
parent
670c43af27
commit
5a5a3c6963
@ -312,6 +312,9 @@ SETUP (const char *dir,
|
|||||||
char **cur;
|
char **cur;
|
||||||
int found = 0;
|
int found = 0;
|
||||||
|
|
||||||
|
if (!root_devices)
|
||||||
|
grub_util_error (_("cannot find a device for %s (is /dev mounted?)"), dir);
|
||||||
|
|
||||||
for (cur = root_devices; *cur; cur++)
|
for (cur = root_devices; *cur; cur++)
|
||||||
{
|
{
|
||||||
char *drive;
|
char *drive;
|
||||||
|
Loading…
Reference in New Issue
Block a user