mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-25 16:49:23 +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:
1 parent
670c43af27
commit
5a5a3c6963
1 file changed
+3
@@ -312,6 +312,9 @@ SETUP (const char *dir,
|
||||
char **cur;
|
||||
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++)
|
||||
{
|
||||
char *drive;
|
||||
|
||||
Reference in new issue
Block a user