diff options
| author | Hu Tao | 2014-01-26 04:12:39 +0100 |
|---|---|---|
| committer | Kevin Wolf | 2014-02-09 09:12:39 +0100 |
| commit | 7c2bbf4aa66ca5a9fc2ca147e0e6cb6f407a3aa2 (patch) | |
| tree | 31daaf4d5aa0dd928d6da2cea12856fe7e08b511 /scripts/checkpatch.pl | |
| parent | qcow2: fix offset overflow in qcow2_alloc_clusters_at() (diff) | |
| download | qemu-7c2bbf4aa66ca5a9fc2ca147e0e6cb6f407a3aa2.tar.gz qemu-7c2bbf4aa66ca5a9fc2ca147e0e6cb6f407a3aa2.tar.xz qemu-7c2bbf4aa66ca5a9fc2ca147e0e6cb6f407a3aa2.zip | |
qcow2: check for NULL l2meta
In the case of a metadata preallocation with a large cluster size,
qcow2_alloc_cluster_offset() can allocate nothing and returns a
NULL l2meta. This patch checks for it and link2 l2 with only valid
l2meta.
Replace 9 and 512 with BDRV_SECTOR_BITS, BDRV_SECTOR_SIZE
respectively while at the function.
Signed-off-by: Hu Tao <hutao@cn.fujitsu.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Benoit Canet <benoit@irqsave.net>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'scripts/checkpatch.pl')
0 files changed, 0 insertions, 0 deletions
