Re: [libvirt] [PATCH] Sanitize qemu monitor reads

2008-09-24 Thread Richard W.M. Jones
On Tue, Sep 23, 2008 at 04:56:08PM -0400, Cole Robinson wrote: @@ -1670,7 +1670,7 @@ qemudMonitorCommand (const struct qemud_driver *driver ATTRIBUTE_UNUSED, const char *cmd, char **reply) { int size = 0; -char *buf = NULL; +char

Re: [libvirt] [PATCH] Sanitize qemu monitor reads

2008-09-24 Thread Cole Robinson
Richard W.M. Jones wrote: It looks to me like tmpbuf is leaked on the two error paths. garbage.collection++ Rich. ah foo, sorry about that. Fixed version attached. Thanks, Cole diff --git a/src/qemu_driver.c b/src/qemu_driver.c index 9d8f75a..b7c8e70 100644 --- a/src/qemu_driver.c +++

[libvirt] [PATCH] Sanitize qemu monitor reads

2008-09-23 Thread Cole Robinson
Reading from the qemu monitor pulls in a whole bunch of useless control characters. For example, sending the command 'somecomm' to the monitor returns: somecomm unknown command: 'somecomm' (qemu) Which is 36 characters, however we end up reading over 200. The amount we read actually grows