aboutsummaryrefslogtreecommitdiff
path: root/slirp/sbuf.c
diff options
context:
space:
mode:
authorDaniel P. Berrange <berrange@redhat.com>2017-09-27 13:53:37 +0100
committerMax Reitz <mreitz@redhat.com>2017-10-06 16:30:47 +0200
commit31376555c7b447afb1bf9084eacbb8f566ff6b9d (patch)
tree5c5e8363fb885e239fe3061c37b81e471f2fd78d /slirp/sbuf.c
parent850f49de9b57511dcaf2cd7e45059f8f38fadf3b (diff)
downloadqemu-31376555c7b447afb1bf9084eacbb8f566ff6b9d.zip
qemu-31376555c7b447afb1bf9084eacbb8f566ff6b9d.tar.gz
qemu-31376555c7b447afb1bf9084eacbb8f566ff6b9d.tar.bz2
block: fix data type casting for crypto payload offset
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. Reviewed-by: Max Reitz <mreitz@redhat.com> Reviewed-by: Eric Blake <eblake@redhat.com> Signed-off-by: Daniel P. Berrange <berrange@redhat.com> Message-id: 20170927125340.12360-4-berrange@redhat.com Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'slirp/sbuf.c')
0 files changed, 0 insertions, 0 deletions