Peter Lieven 78a52ad5ac 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>
2013-11-14 13:09:07 +01:00
..
2013-10-11 10:52:54 +02:00
2013-10-11 16:50:00 +02:00
2013-10-11 16:50:00 +02:00
2013-10-11 10:52:54 +02:00
2013-10-26 13:01:57 +04:00
2013-10-11 10:52:54 +02:00
2013-10-28 17:34:32 +01:00
2013-10-11 10:52:54 +02:00
2013-11-07 13:58:59 +01:00
2013-10-31 14:44:43 +01:00