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

2017-08-07 Thread Kevin Wolf
Am 07.08.2017 um 05:08 hat Jeff Cody geschrieben: > 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

[Qemu-block] [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