Re: [Qemu-devel] [PATCH 2/2] block/vhdx: check for offset overflow to bdrv_truncate()

2017-08-07 Thread Jeff Cody
On Mon, Aug 07, 2017 at 06:24:30AM -0500, Eric Blake wrote: > On 08/06/2017 10:08 PM, Jeff Cody wrote: > > VHDX uses uint64_t types for most offsets, following the VHDX spec. > > However, bdrv_truncate() takes an int64_t value for the truncating > > offset. Check for overflow before calling

Re: [Qemu-devel] [PATCH 2/2] block/vhdx: check for offset overflow to bdrv_truncate()

2017-08-07 Thread Eric Blake
On 08/06/2017 10:08 PM, Jeff Cody wrote: > VHDX uses uint64_t types for most offsets, following the VHDX spec. > However, bdrv_truncate() takes an int64_t value for the truncating > offset. Check for overflow before calling bdrv_truncate(). > > N.B.: For a compliant image this is not an issue,

[Qemu-devel] [PATCH 2/2] block/vhdx: check for offset overflow to bdrv_truncate()

2017-08-06 Thread Jeff Cody
VHDX uses uint64_t types for most offsets, following the VHDX spec. However, bdrv_truncate() takes an int64_t value for the truncating offset. Check for overflow before calling bdrv_truncate(). N.B.: For a compliant image this is not an issue, as the maximum VHDX image size is defined per the