aboutsummaryrefslogtreecommitdiff
path: root/tests/qemu-iotests/027
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2014-04-14 15:39:36 +0200
committerKevin Wolf <kwolf@redhat.com>2014-04-22 11:57:02 +0200
commitda15ee5134f715adb07e3688a1c6e8b42cb6ac94 (patch)
tree5f33a291e25b374e131f2c4f375a3524183accf3 /tests/qemu-iotests/027
parent1dd3a44753f10970ded50950d28353c00bfcaf91 (diff)
block: Catch integer overflow in bdrv_rw_co()
Insanely large requests could cause an integer overflow in bdrv_rw_co() while converting sectors to bytes. This patch catches the problem and returns an error (if we hadn't overflown the integer here, bdrv_check_byte_request() would have rejected the request, so we're not breaking anything that was supposed to work before). We actually do have a test case that triggers behaviour where we accidentally let such a request pass, so that it would return success, but read 0 bytes instead of the requested 4 GB. It fails now like it should. If the vdi block driver wants to be able to deal with huge images, it can't read the whole block bitmap at once into memory like it does today, but needs to use a metadata cache like qcow2 does. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/027')
0 files changed, 0 insertions, 0 deletions