Re: [Qemu-block] [PATCH v3 3/7] block: fix data type casting for crypto payload offset

2017-09-18 Thread Eric Blake
On 09/12/2017 06:28 AM, Daniel P. Berrange wrote: > The crypto APIs report the offset of the data payload as an uint64_t > type, but the block driver is casting to size_t or ssize_t which will > potentially truncate. > > Most of the block APIs use int64_t for offsets meanwhile, so even if > using

Re: [Qemu-block] [PATCH v3 3/7] block: fix data type casting for crypto payload offset

2017-09-16 Thread Max Reitz
On 2017-09-12 13:28, Daniel P. Berrange wrote: > The crypto APIs report the offset of the data payload as an uint64_t > type, but the block driver is casting to size_t or ssize_t which will > potentially truncate. > > Most of the block APIs use int64_t for offsets meanwhile, so even if > using

[Qemu-block] [PATCH v3 3/7] block: fix data type casting for crypto payload offset

2017-09-12 Thread Daniel P. Berrange
The crypto APIs report the offset of the data payload as an uint64_t type, but the block driver is casting to size_t or ssize_t which will potentially truncate. Most of the block APIs use int64_t for offsets meanwhile, so even if using uint64_t in the crypto block driver we are still at risk of