]> Git Repo - qemu.git/commit
qcow2: Check snapshot L1 table in qcow2_snapshot_delete()
authorAlberto Garcia <[email protected]>
Tue, 6 Mar 2018 16:14:11 +0000 (18:14 +0200)
committerKevin Wolf <[email protected]>
Fri, 9 Mar 2018 14:17:47 +0000 (15:17 +0100)
commitdb5794f1f17d1f8247c0ea8e6f0376a47b112466
treeffdca4121775ac6d8d36079310908c8b499e13e1
parenta8475d7573c0598ba8f92f84534110218ee11e3d
qcow2: Check snapshot L1 table in qcow2_snapshot_delete()

This function deletes a snapshot from disk, removing its entry from
the snapshot table, freeing its L1 table and decreasing the refcounts
of all clusters.

The L1 table offset and size are however not validated. If we use
invalid values in this function we'll probably corrupt the image even
more, so we should return an error instead.

We now have a function to take care of this, so let's use it.

Signed-off-by: Alberto Garcia <[email protected]>
Reviewed-by: Eric Blake <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
block/qcow2-snapshot.c
tests/qemu-iotests/080
tests/qemu-iotests/080.out
This page took 0.026868 seconds and 4 git commands to generate.