]> git.proxmox.com Git - grub2.git/commit
disk/lvm: Bail on missing PV list
authorDaniel Axtens <dja@axtens.net>
Thu, 21 Jan 2021 07:54:29 +0000 (18:54 +1100)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 2 Mar 2021 14:54:18 +0000 (15:54 +0100)
commit2958695c4cdc785de6ed708709af071a2d20afef
treef70a10fc1cb052bd9d34ebad57c336c651c62659
parent27a79bf38e6d050e497eb96a3fdddce43af25577
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>
grub-core/disk/lvm.c