]> git.proxmox.com Git - mirror_qemu.git/commit
qcow2: Assert that the crypto header does not overlap other metadata
authorAlberto Garcia <berto@igalia.com>
Fri, 3 Nov 2017 14:18:56 +0000 (16:18 +0200)
committerMax Reitz <mreitz@redhat.com>
Tue, 14 Nov 2017 17:06:25 +0000 (18:06 +0100)
commitc9b83e9c23ecb094ddf987c7c37b8f454cb80615
tree2c903053d7fd1ecad0540407066875f2159f64a4
parentef083f61af65209ab553569903a5396c25e6f2c3
qcow2: Assert that the crypto header does not overlap other metadata

The crypto header is initialized only when QEMU is creating a new
image, so there's no chance of this happening on a corrupted image.

If QEMU is really trying to allocate the header overlapping other
existing metadata sections then this is a serious bug in QEMU itself
so let's add an assertion.

Signed-off-by: Alberto Garcia <berto@igalia.com>
Message-id: ae3d77f312fc0c5e0ac2bbd71676c0112eebe2e5.1509718618.git.berto@igalia.com
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Max Reitz <mreitz@redhat.com>
block/qcow2.c