mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-03 07:33:50 +00:00
qemu: Fix lookup against stateless/combined pflash
Just like the more common split builds, these are of type QEMU_FIRMWARE_DEVICE_FLASH; however, they have no associated NVRAM template, so we can't access the corresponding structure member unconditionally or we'll trigger a crash. https://bugzilla.redhat.com/show_bug.cgi?id=2196178 Signed-off-by: Andrea Bolognani <abologna@redhat.com> Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
parent
d917883b30
commit
ac76386eda
@ -971,9 +971,12 @@ qemuFirmwareMatchesPaths(const qemuFirmware *fw,
|
||||
if (loader && loader->path &&
|
||||
STRNEQ(loader->path, flash->executable.filename))
|
||||
return false;
|
||||
if (loader && loader->nvramTemplate &&
|
||||
STRNEQ(loader->nvramTemplate, flash->nvram_template.filename))
|
||||
return false;
|
||||
if (loader && loader->nvramTemplate) {
|
||||
if (flash->mode != QEMU_FIRMWARE_FLASH_MODE_SPLIT)
|
||||
return false;
|
||||
if (STRNEQ(loader->nvramTemplate, flash->nvram_template.filename))
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
case QEMU_FIRMWARE_DEVICE_MEMORY:
|
||||
if (loader && loader->path &&
|
||||
|
Loading…
x
Reference in New Issue
Block a user