-
由 Kevin Wolf 提交于
Huge values for header.cluster_bits cause unbounded allocations (e.g. for s->cluster_cache) and crash qemu this way. Less huge values may survive those allocations, but can cause integer overflows later on. The only cluster sizes that qemu can create are 4k (for standalone images) and 512 (for images with backing files), so we can limit it to 64k. Cc: qemu-stable@nongnu.org Signed-off-by: NKevin Wolf <kwolf@redhat.com> Reviewed-by: NBenoit Canet <benoit@irqsave.net> (cherry picked from commit 7159a45b) Conflicts: block/qcow.c tests/qemu-iotests/group *removed mismatch due to error msgs from upstream's b6d5066d *removed context from upstream block tests Signed-off-by: NMichael Roth <mdroth@linux.vnet.ibm.com>
e6c55cf7