Re: [Qemu-devel] [PATCH v2 2/9] cutils: Fix qemu_strtosz() & friends to reject non-finite sizes

2018-11-21 Thread Eric Blake
On 11/21/18 4:44 AM, David Hildenbrand wrote: @@ -206,20 +206,18 @@ static int64_t suffix_mul(char suffix, int64_t unit) * in *end, if not NULL. Return -ERANGE on overflow, Return -EINVAL on Pre-existing, but since you're touching this area: the second 'Return' is unusual capitalization

Re: [Qemu-devel] [PATCH v2 2/9] cutils: Fix qemu_strtosz() & friends to reject non-finite sizes

2018-11-21 Thread Markus Armbruster
David Hildenbrand writes: > On 20.11.18 21:41, Eric Blake wrote: >> On 11/20/18 2:31 PM, Markus Armbruster wrote: >>> Eric Blake writes: >>> On 11/20/18 3:25 AM, David Hildenbrand wrote: > qemu_strtosz() & friends reject NaNs, but happily accept inifities.

Re: [Qemu-devel] [PATCH v2 2/9] cutils: Fix qemu_strtosz() & friends to reject non-finite sizes

2018-11-21 Thread David Hildenbrand
On 20.11.18 21:41, Eric Blake wrote: > On 11/20/18 2:31 PM, Markus Armbruster wrote: >> Eric Blake writes: >> >>> On 11/20/18 3:25 AM, David Hildenbrand wrote: qemu_strtosz() & friends reject NaNs, but happily accept inifities. >>> >>> s/inifities/infinities/ >>> They shouldn't. Fix

Re: [Qemu-devel] [PATCH v2 2/9] cutils: Fix qemu_strtosz() & friends to reject non-finite sizes

2018-11-20 Thread Eric Blake
On 11/20/18 2:31 PM, Markus Armbruster wrote: Eric Blake writes: On 11/20/18 3:25 AM, David Hildenbrand wrote: qemu_strtosz() & friends reject NaNs, but happily accept inifities. s/inifities/infinities/ They shouldn't. Fix that. The fix makes use of qemu_strtod_finite(). To avoid ugly

Re: [Qemu-devel] [PATCH v2 2/9] cutils: Fix qemu_strtosz() & friends to reject non-finite sizes

2018-11-20 Thread Markus Armbruster
Eric Blake writes: > On 11/20/18 3:25 AM, David Hildenbrand wrote: >> qemu_strtosz() & friends reject NaNs, but happily accept inifities. > > s/inifities/infinities/ > >> They shouldn't. Fix that. >> >> The fix makes use of qemu_strtod_finite(). To avoid ugly casts, >> change the @end parameter

Re: [Qemu-devel] [PATCH v2 2/9] cutils: Fix qemu_strtosz() & friends to reject non-finite sizes

2018-11-20 Thread Eric Blake
On 11/20/18 3:25 AM, David Hildenbrand wrote: qemu_strtosz() & friends reject NaNs, but happily accept inifities. s/inifities/infinities/ They shouldn't. Fix that. The fix makes use of qemu_strtod_finite(). To avoid ugly casts, change the @end parameter of qemu_strtosz() & friends from char