summaryrefslogtreecommitdiffstats
path: root/include/exec
diff options
context:
space:
mode:
authorPeter Lieven2018-07-13 09:15:39 +0200
committerKevin Wolf2018-07-23 16:50:43 +0200
commit6360ab278cc1ac3e1235e0755e4cba1f918e6f3c (patch)
tree9f92ac840c9baa83e849040823e2e2dba5a71627 /include/exec
parentblock: Fix typos in comments (found by codespell) (diff)
downloadqemu-6360ab278cc1ac3e1235e0755e4cba1f918e6f3c.tar.gz
qemu-6360ab278cc1ac3e1235e0755e4cba1f918e6f3c.tar.xz
qemu-6360ab278cc1ac3e1235e0755e4cba1f918e6f3c.zip
qemu-img: avoid overflow of min_sparse parameter
the min_sparse convert parameter can overflow (e.g. -S 1024G) in the conversion from int64_t to int resulting in a negative min_sparse parameter. Avoid this by limiting the valid parameters to sane values. In fact anything exceeding the convert buffer size is also pointless. While at it also forbid values that are non multiple of 512 to avoid undesired behaviour. For instance, values between 1 and 511 were legal, but resulted in full allocation. Cc: qemu-stable@nongnu.org Signed-off-by: Peter Lieven <pl@kamp.de> Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Diffstat (limited to 'include/exec')
0 files changed, 0 insertions, 0 deletions