summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMax Reitz <mreitz@redhat.com>2016-06-20 16:26:22 +0200
committerMax Reitz <mreitz@redhat.com>2016-07-13 13:41:38 +0200
commita367467995d0528fe591d87ca2e437c7b7d7951b (patch)
tree62d189bc598769a9624e86f25ab7de0cc473f753 /include
parent84c26520d3c1c9ff4a10455748139463278816d5 (diff)
downloadqemu-a367467995d0528fe591d87ca2e437c7b7d7951b.tar.gz
qemu-a367467995d0528fe591d87ca2e437c7b7d7951b.tar.bz2
qemu-a367467995d0528fe591d87ca2e437c7b7d7951b.zip
qemu-io: Use correct range limitations
create_iovec() has a comment lamenting the lack of SIZE_T_MAX. Since there actually is a SIZE_MAX, use it. Two places use INT_MAX for checking the upper bound of a sector count that is used as an argument for a blk_*() function (blk_discard() and blk_write_compressed(), respectively). BDRV_REQUEST_MAX_SECTORS should be used instead. And finally, do_co_pwrite_zeroes() used to similarly check that the sector count does not exceed INT_MAX. However, this function is now backed by blk_co_pwrite_zeroes() which takes bytes as an argument instead of sectors. Therefore, it should be the byte count that does not exceed INT_MAX, not the sector count. Signed-off-by: Max Reitz <mreitz@redhat.com>
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions