unicorn/qemu/util
David Hildenbrand 67f9141b13
cutils: Fix qemu_strtosz() & friends to reject non-finite sizes
qemu_strtosz() & friends reject NaNs, but happily accept 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 **
to const char **.

Also, add two test cases, testing that "inf" and "NaN" are properly
rejected. While at it, also fixup the function documentation.

Backports commit af02f4c5179675ad4e26b17ba26694a8fcde17fa from qemu
2018-12-18 04:48:12 -05:00
..
bitmap.c
bitops.c
cacheinfo.c
crc32c.c
cutils.c cutils: Fix qemu_strtosz() & friends to reject non-finite sizes 2018-12-18 04:48:12 -05:00
error.c
getauxval.c
host-utils.c
log.c
Makefile.objs
mmap-alloc.c
module.c
oslib-posix.c
oslib-win32.c
qemu-error.c
qemu-thread-posix.c
qemu-thread-win32.c
qemu-timer-common.c
range.c
sys_membarrier.c