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 uint64_t in the crypto block driver we are still at risk of > truncation. > > Change the block crypto driver to use uint64_t, but add asserts that > the value is less than INT64_MAX. > > Signed-off-by: Daniel P. Berrange <berra...@redhat.com> > --- > block/crypto.c | 13 +++++++++---- > 1 file changed, 9 insertions(+), 4 deletions(-)
Reviewed-by: Max Reitz <mre...@redhat.com>
signature.asc
Description: OpenPGP digital signature