]> 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)
committerPeter Krempa <pkrempa@redhat.com>
Thu, 14 Jun 2012 08:29:36 +0000 (10:29 +0200)
commit0f4660c8787cc41fe67f869984c0ae11d680037e
tree6d777f6ba5bd58d391579d0c8213122a2bed3a8a
parent5b4740265cf1e9cd00165e54e1f5e81f9008bc63
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.
src/qemu/qemu_monitor.c