mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-25 16:49:23 +00:00
disk/lvm: Bail on missing PV list
There's an if block for the presence of "physical_volumes {", but if
that block is absent, then p remains NULL and a NULL-deref will result
when looking for logical volumes.
It doesn't seem like LVM makes sense without physical volumes, so error
out rather than crashing.
Signed-off-by: Daniel Axtens <dja@axtens.net>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
1 parent
27a79bf38e
commit
2958695c4c
1 file changed
+2
@@ -409,6 +409,8 @@ grub_lvm_detect (grub_disk_t disk,
|
|||||||
goto fail4;
|
goto fail4;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
goto fail4;
|
||||||
|
|
||||||
p = grub_strstr (p, "logical_volumes {");
|
p = grub_strstr (p, "logical_volumes {");
|
||||||
if (p)
|
if (p)
|
||||||
|
|||||||
Reference in new issue
Block a user