qemu-e2k/util
Fam Zheng 972606c4db blockdev: Error out on negative throttling option values
extract_common_blockdev_options() uses qemu_opt_get_number() to parse
the bps/iops numbers to uint64_t, then converts to double and stores in
ThrottleConfig.  The actual parsing is done by strtoull() in
parse_option_number().  Negative numbers are wrapped to large positive
ones, and stored.

We used to reject negative numbers since 7d81c1413c, but this regressed
when the option parsing code was changed later. Now fix this again.

This time, define an arbitrary large upper limit (1e15),  and check the
values so both negative and impractically big numbers are caught and
reported.

Signed-off-by: Fam Zheng <famz@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Reviewed-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2016-01-20 13:37:37 +01:00
..
acl.c
base64.c util: add base64 decoding function 2015-12-18 16:25:08 +00:00
bitmap.c
bitops.c
buffer.c buffer: allow a buffer to shrink gracefully 2015-11-05 09:09:58 +01:00
compatfd.c
coroutine-gthread.c
coroutine-sigaltstack.c
coroutine-ucontext.c
coroutine-win32.c
crc32c.c
cutils.c
envlist.c
error.c error: New error_prepend(), error_reportf_err() 2016-01-13 15:16:17 +01:00
event_notifier-posix.c
event_notifier-win32.c
fifo8.c
getauxval.c
hbitmap.c
hexdump.c
host-utils.c
id.c util/id: fully allocate names table 2015-12-04 09:39:55 +03:00
iov.c
Makefile.objs util: add base64 decoding function 2015-12-18 16:25:08 +00:00
memfd.c
mmap-alloc.c mmap-alloc: tweak a comment on ppc64 2015-12-22 17:45:12 +02:00
module.c
notify.c
osdep.c osdep: Change default value of qemu_hw_version() to "2.5+" 2015-11-25 13:42:37 +02:00
oslib-posix.c util/mmap-alloc: fix hugetlb support on ppc64 2015-12-02 22:38:23 +02:00
oslib-win32.c oslib-win32: Change return type of function getpagesize 2015-11-30 06:47:02 +01:00
path.c
qemu-config.c
qemu-coroutine-io.c
qemu-coroutine-lock.c
qemu-coroutine-sleep.c
qemu-coroutine.c
qemu-error.c error: Improve documentation 2016-01-13 15:16:16 +01:00
qemu-openpty.c
qemu-option.c error: Don't append a newline when printing the error hint 2016-01-13 11:58:58 +01:00
qemu-progress.c progress: Allow regressing progress 2015-12-18 14:34:43 +01:00
qemu-sockets.c io: add QIOChannelSocket class 2015-12-18 12:18:31 +00:00
qemu-thread-posix.c
qemu-thread-win32.c
qemu-timer-common.c
rcu.c
readline.c
rfifolock.c
throttle.c blockdev: Error out on negative throttling option values 2016-01-20 13:37:37 +01:00
timed-average.c block: Add average I/O queue depth to BlockDeviceTimedStats 2015-11-12 16:22:46 +01:00
unicode.c
uri.c