]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commit
qemu: monitor: Fix type of holdtime argument in qemuMonitorJSONSendKey
authorPeter Krempa <pkrempa@redhat.com>
Tue, 3 Jun 2014 09:19:51 +0000 (11:19 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Tue, 3 Jun 2014 12:24:14 +0000 (14:24 +0200)
commitce2107a9a04be68fc22dc777e1f03bba0d1a382b
tree77ab981f1fa3d0086803a9c9c148e663dae5ec59
parent10a99a6d130b2266fa9b42073aad977abd7418c5
qemu: monitor: Fix type of holdtime argument in qemuMonitorJSONSendKey

qemuMonitorJSONSendKey declares the "holdtime" argument as unsigned int
while the command was constructed in qemuMonitorJSONMakeCommand using
the "P" modifier which took a unsigned long from the variable
arguments which then made it possible to access uninitialized memory.

This broke the qemumonitorjsontest on 32bit fedora 20:
64) qemuMonitorJSONSendKey
... libvirt: QEMU Driver error : internal error: unsupported data type 'W' for arg 'WVS\83ì \8bD$0è\91wÿÿ\81ÃAå' FAILED

Uncovered by upstream commit f744b831c66d9e82453f7a96cab5eddf7570c253.

Additionally add test for the hold-time option.
src/qemu/qemu_monitor_json.c
tests/qemumonitorjsontest.c