qcow2: Assert against currently impossible overflow
authorMax Reitz <mreitz@redhat.com>
Wed, 25 Sep 2013 15:48:55 +0000 (17:48 +0200)
committerKevin Wolf <kwolf@redhat.com>
Wed, 25 Sep 2013 19:57:44 +0000 (21:57 +0200)
commitc01dbccbad647be5784be39eb8fa0144732295db
treea271d7b25995e66a5782e449cc5911b60b4dc404
parent687fb89366366ce654a17c15af48adfe8c4ce70a
qcow2: Assert against currently impossible overflow

If qcow2_alloc_cluster_link_l2 is called with a QCowL2Meta describing a
request crossing L2 boundaries, a buffer overflow will occur. This is
impossible right now since such requests are never generated (every
request is shortened to L2 boundaries before) and probably also
completely unintended (considering the name "QCowL2Meta"), however, it
is still worth an assertion.

Signed-off-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
block/qcow2-cluster.c