aboutsummaryrefslogtreecommitdiff
path: root/qom
diff options
context:
space:
mode:
authorPeter Lieven <pl@kamp.de>2013-11-12 13:48:07 +0100
committerKevin Wolf <kwolf@redhat.com>2013-11-14 13:09:07 +0100
commit78a52ad5acca7053b774fcc80290e7b7e224c80a (patch)
tree86e84d4bf15952a68c837739be841ab8e6c44764 /qom
parent968854c8a106243eae7a68394ce1cb85dc138837 (diff)
downloadqemu-78a52ad5acca7053b774fcc80290e7b7e224c80a.zip
qemu-78a52ad5acca7053b774fcc80290e7b7e224c80a.tar.gz
qemu-78a52ad5acca7053b774fcc80290e7b7e224c80a.tar.bz2
qcow2: fix possible corruption when reading multiple clusters
if multiple sectors spanning multiple clusters are read the function count_contiguous_clusters should ensure that the cluster type should not change between the clusters. Especially the for-loop should break when we have one or more normal clusters followed by a compressed cluster. Unfortunately the wrong macro was used in the mask to compare the flags. This was discovered while debugging a data corruption issue when converting a compressed qcow2 image to raw. qemu-img reads 2MB chunks which span multiple clusters. CC: qemu-stable@nongnu.org Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'qom')
0 files changed, 0 insertions, 0 deletions