mirror of
https://github.com/xemu-project/xemu.git
synced 2024-12-19 09:48:16 +00:00
715c3f60ef
The old check was off by a factor of 512 and didn't consider cases where we don't get an exact division. This could lead to an out-of-bounds array access in seek_to_sector(). Signed-off-by: Kevin Wolf <kwolf@redhat.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
29 lines
1020 B
Plaintext
29 lines
1020 B
Plaintext
QA output created by 078
|
|
|
|
== Read from a valid image ==
|
|
read 512/512 bytes at offset 0
|
|
512 bytes, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)
|
|
|
|
== Negative catalog size ==
|
|
qemu-io: can't open device TEST_DIR/empty.bochs: Catalog size is too large
|
|
no file open, try 'help open'
|
|
|
|
== Overflow for catalog size * sizeof(uint32_t) ==
|
|
qemu-io: can't open device TEST_DIR/empty.bochs: Catalog size is too large
|
|
no file open, try 'help open'
|
|
|
|
== Too small catalog bitmap for image size ==
|
|
qemu-io: can't open device TEST_DIR/empty.bochs: Catalog size is too small for this disk size
|
|
no file open, try 'help open'
|
|
qemu-io: can't open device TEST_DIR/empty.bochs: Catalog size is too small for this disk size
|
|
no file open, try 'help open'
|
|
|
|
== Negative extent size ==
|
|
qemu-io: can't open device TEST_DIR/empty.bochs: Extent size 2147483648 is too large
|
|
no file open, try 'help open'
|
|
|
|
== Zero extent size ==
|
|
qemu-io: can't open device TEST_DIR/empty.bochs: Extent size must be at least 512
|
|
no file open, try 'help open'
|
|
*** done
|