Re: [Qemu-devel] [PATCH v2 34/36] block: Fail bdrv_truncate() with negative size

2018-02-22 Thread Eric Blake
On 02/21/2018 07:54 AM, Kevin Wolf wrote: 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

[Qemu-devel] [PATCH v2 34/36] block: Fail bdrv_truncate() with negative size

2018-02-21 Thread Kevin Wolf
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-b