]> git.ipfire.org Git - thirdparty/libvirt.git/commit
qemu: Fix off-by-one error while unescaping monitor strings
authorPeter Krempa <pkrempa@redhat.com>
Thu, 14 Jun 2012 08:29:36 +0000 (10:29 +0200)
committerCole Robinson <crobinso@redhat.com>
Thu, 14 Jun 2012 22:38:27 +0000 (18:38 -0400)
commit0889bdb844e155dfb51a224094554f0836b8c230
tree0da6cfcff0b1a1ede4e4ee3e37b6845eba9e1c8f
parent73908b1d1045ed7e0cb4298e6a7f3f5fdfd1a386
qemu: Fix off-by-one error while unescaping monitor strings

While unescaping the commands the commands passed through to the monitor
function qemuMonitorUnescapeArg() initialized lenght of the input string
to strlen()+1 which is fine for alloc but not for iteration of the
string.

This patch fixes the off-by-one error and drops the pointless check for
a single trailing slash that is automaticaly handled by the default
branch of switch.
(cherry picked from commit 0f4660c8787cc41fe67f869984c0ae11d680037e)
src/qemu/qemu_monitor.c