diff options
author | Kevin Wolf | 2018-02-07 17:58:47 +0100 |
---|---|---|
committer | Kevin Wolf | 2018-03-09 15:17:48 +0100 |
commit | cd8b7aaa073d83337dd100f6258a56fdd76d778d (patch) | |
tree | b47d7bc0c14631b96aee845966c3400aa9856016 /hw/arm/virt.c | |
parent | file-posix: Fix no-op bdrv_truncate() with falloc preallocation (diff) | |
download | qemu-cd8b7aaa073d83337dd100f6258a56fdd76d778d.tar.gz qemu-cd8b7aaa073d83337dd100f6258a56fdd76d778d.tar.xz qemu-cd8b7aaa073d83337dd100f6258a56fdd76d778d.zip |
block: Fail bdrv_truncate() with negative size
Most callers have their own checks, but something like this should also
be checked centrally. As it happens, x-blockdev-create can pass negative
image sizes to format drivers (because there is no QAPI type that would
reject negative numbers) and triggers the check added by this patch.
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'hw/arm/virt.c')
0 files changed, 0 insertions, 0 deletions