mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-10 05:17:59 +03:00
qemu: driver: Fix off-by-one in qemuDomainSnapshotDiskDataCollect
Commit f34397e51c
introduced a crash-inducing problem when collecting
disk snapshot data, where the array would be filled starting from the
second element.
The code then dereferenced the first one.
Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
This commit is contained in:
parent
2348c00f10
commit
d79ec3f33b
@ -15073,8 +15073,8 @@ qemuDomainSnapshotDiskDataCollect(virQEMUDriverPtr driver,
|
||||
if (snapdef->disks[i].snapshot == VIR_DOMAIN_SNAPSHOT_LOCATION_NONE)
|
||||
continue;
|
||||
|
||||
ndata++;
|
||||
dd = data + ndata;
|
||||
ndata++;
|
||||
|
||||
dd->disk = vm->def->disks[i];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user