diff options
author | Kevin Wolf <kwolf@redhat.com> | 2014-03-26 13:05:47 +0100 |
---|---|---|
committer | Stefan Hajnoczi <stefanha@redhat.com> | 2014-04-01 14:19:09 +0200 |
commit | 6d33e8e7dc9d40ea105feed4b39caa3e641569e8 (patch) | |
tree | dc0f7b63b5d42aa84af6f51dffe16c4193594c59 /tests/qemu-iotests/080.out | |
parent | 2d51c32c4b511db8bb9e58208f1e2c25e4c06c85 (diff) |
qcow2: Fix backing file name length check
len could become negative and would pass the check then. Nothing bad
happened because bdrv_pread() happens to return an error for negative
length values, but make variables for sizes unsigned anyway.
This patch also changes the behaviour to error out on invalid lengths
instead of silently truncating it to 1023.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Diffstat (limited to 'tests/qemu-iotests/080.out')
-rw-r--r-- | tests/qemu-iotests/080.out | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/qemu-iotests/080.out b/tests/qemu-iotests/080.out index 4ec2545051..8103211064 100644 --- a/tests/qemu-iotests/080.out +++ b/tests/qemu-iotests/080.out @@ -58,4 +58,9 @@ qemu-io: can't open device TEST_DIR/t.qcow2: Invalid L1 table offset no file open, try 'help open' qemu-io: can't open device TEST_DIR/t.qcow2: Invalid L1 table offset no file open, try 'help open' + +== Invalid backing file size == +Formatting 'TEST_DIR/t.IMGFMT', fmt=IMGFMT size=67108864 +qemu-io: can't open device TEST_DIR/t.qcow2: Backing file name too long +no file open, try 'help open' *** done |