diff options
author | Luiz Capitulino <lcapitulino@redhat.com> | 2014-09-15 12:00:11 -0400 |
---|---|---|
committer | Luiz Capitulino <lcapitulino@redhat.com> | 2014-09-26 13:14:10 -0400 |
commit | 1f9296b51a26650916a2c4191268bb64057bdc5f (patch) | |
tree | f3341643d56bc0dba3a7bc13f41e68b638ca5452 /qapi | |
parent | e5554e2015f8fb452135f7b1ce1976536266379c (diff) | |
download | qemu-1f9296b51a26650916a2c4191268bb64057bdc5f.zip qemu-1f9296b51a26650916a2c4191268bb64057bdc5f.tar.gz qemu-1f9296b51a26650916a2c4191268bb64057bdc5f.tar.bz2 |
virtio-balloon: fix integer overflow in memory stats feature
When a QMP client changes the polling interval time by setting
the guest-stats-polling-interval property, the interval value
is stored and manipulated as an int64_t variable.
However, the balloon_stats_change_timer() function, which is
used to set the actual timer with the interval value, takes
an int instead, causing an overflow for big interval values.
This commit fix this bug by changing balloon_stats_change_timer()
to take an int64_t and also it limits the polling interval value
to UINT_MAX to avoid other kinds of overflow.
Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
Diffstat (limited to 'qapi')
0 files changed, 0 insertions, 0 deletions