diff options
| author | Max Reitz | 2016-06-20 16:26:22 +0200 |
|---|---|---|
| committer | Max Reitz | 2016-07-13 13:41:38 +0200 |
| commit | a367467995d0528fe591d87ca2e437c7b7d7951b (patch) | |
| tree | 62d189bc598769a9624e86f25ab7de0cc473f753 /block/commit.c | |
| parent | qcow2: Avoid making the L1 table too big (diff) | |
| download | qemu-a367467995d0528fe591d87ca2e437c7b7d7951b.tar.gz qemu-a367467995d0528fe591d87ca2e437c7b7d7951b.tar.xz 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 'block/commit.c')
0 files changed, 0 insertions, 0 deletions
