]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: detect truncated file as invalid save image
authorEric Blake <eblake@redhat.com>
Fri, 16 Dec 2011 00:28:18 +0000 (17:28 -0700)
committerEric Blake <eblake@redhat.com>
Fri, 16 Dec 2011 15:29:31 +0000 (08:29 -0700)
commitd99fe011a2bbf3b42f482edb7c86c60b4f8ccd09
treec9c8bb449e949af6dbf2294871729d6b0f8eda8b
parent13d5a6b83d5252ce323889022e142e797a96d89c
qemu: detect truncated file as invalid save image

If managed save fails at the right point in time, then the save
image can end up with 0 bytes in length (no valid header), and
our attempts in commit 55d88def to detect and skip invalid save
files missed this case.

* src/qemu/qemu_driver.c (qemuDomainSaveImageOpen): Also unlink
empty file as corrupt.  Reported by Dennis Householder.
src/qemu/qemu_driver.c