qcow2: Check L1/L2/reftable entries for alignment
commita97c67ee6c1546b985c1048c7a1f9e4fc13d9ee1
authorMax Reitz <mreitz@redhat.com>
Fri, 5 Sep 2014 14:07:18 +0000 (5 16:07 +0200)
committerStefan Hajnoczi <stefanha@redhat.com>
Mon, 22 Sep 2014 10:39:28 +0000 (22 11:39 +0100)
tree521747581a617c39595dde3341f7a90cf0ac9751
parentadb435522b86b3fca2324cb8c94e17b55ae071f1
qcow2: Check L1/L2/reftable entries for alignment

Offsets taken from the L1, L2 and refcount tables are generally assumed
to be correctly aligned. However, this cannot be guaranteed if the image
has been written to by something different than qemu, thus check all
offsets taken from these tables for correct cluster alignment.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 1409926039-29044-5-git-send-email-mreitz@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
block/qcow2-cluster.c
block/qcow2-refcount.c