Re: [Qemu-devel] [PATCH] qemu-img: avoid overflow of min_sparse parameter

2018-07-13 Thread Kevin Wolf
Am 12.07.2018 um 21:08 hat Peter Lieven geschrieben: > 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 c

[Qemu-devel] [PATCH] qemu-img: avoid overflow of min_sparse parameter

2018-07-12 Thread Peter Lieven
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