]> git.ipfire.org Git - thirdparty/libvirt.git/commit
blkdeviotune: check for overflow when parsing XML
authorErik Skultety <eskultet@redhat.com>
Tue, 26 Aug 2014 11:29:10 +0000 (13:29 +0200)
committerJán Tomko <jtomko@redhat.com>
Tue, 26 Aug 2014 15:22:35 +0000 (17:22 +0200)
commit2f0944dec1caf0ae842f28bb4e739417244210a0
tree706ce7b55bf60dd4d0303a73b4fc54a3093ff639
parentc285ffc4c2f042941acc44406bdd442252d1b0aa
blkdeviotune: check for overflow when parsing XML

According to docs/schemas/domaincommon.rng and _virDomainBlockIoTuneInfo
all the iotune values are interpreted as unsigned long long, however
according to qemu_monitor_json.c, qemu silently truncates numbers
larger than LLONG_MAX. There's really not much of a usage for such
large numbers anyway yet. This patch provides the same overflow
check during a domain start as it does during setting
a blkdeviotune element in qemu_driver.c and thus reports an error when
a larger number than LLONG_MAX is detected.

https://bugzilla.redhat.com/show_bug.cgi?id=1131876
src/qemu/qemu_command.c