qcow2: fix range check
commitee18e730234792b33e01d47939f4c30f29c9744e
authorFrediano Ziglio <freddy77@gmail.com>
Sat, 10 Sep 2011 08:23:56 +0000 (10 10:23 +0200)
committerKevin Wolf <kwolf@redhat.com>
Mon, 12 Sep 2011 13:17:22 +0000 (12 15:17 +0200)
tree8eac1cbd5b066ebf81744ac073e0840c85336d85
parentdea43a65d6b09c43cc7df94f76bb7522016318f4
qcow2: fix range check

QCowL2Meta::offset is not cluster aligned but only sector aligned
however nb_clusters count cluster from cluster start.
This fix range check. Note that old code have no corruption issues
related to this check cause it only cause intersection to occur
when shouldn't.

Signed-off-by: Frediano Ziglio <freddy77@gmail.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qcow2-cluster.c