Re: [Qemu-devel] [PATCH] libqtest: escape strings in QMP commands, fix leak

2014-06-24 Thread Amos Kong
On Fri, Jun 13, 2014 at 10:15:00AM +0200, Paolo Bonzini wrote: > libqtest is using g_strdup_printf to format QMP commands, but > this does not work if the argument strings need to be escaped. > Instead, use the fancy %-formatting functionality of QObject. > The only change required in tests is that

Re: [Qemu-devel] [PATCH] libqtest: escape strings in QMP commands, fix leak

2014-06-22 Thread Stefan Hajnoczi
On Fri, Jun 13, 2014 at 10:15:00AM +0200, Paolo Bonzini wrote: > libqtest is using g_strdup_printf to format QMP commands, but > this does not work if the argument strings need to be escaped. > Instead, use the fancy %-formatting functionality of QObject. > The only change required in tests is that

Re: [Qemu-devel] [PATCH] libqtest: escape strings in QMP commands, fix leak

2014-06-18 Thread Paolo Bonzini
Il 18/06/2014 09:41, Amos Kong ha scritto: - Fixed Andreas's mail address On Fri, Jun 13, 2014 at 10:15:00AM +0200, Paolo Bonzini wrote: libqtest is using g_strdup_printf to format QMP commands, but this does not work if the argument strings need to be escaped. Instead, use the fancy %-formatti

Re: [Qemu-devel] [PATCH] libqtest: escape strings in QMP commands, fix leak

2014-06-18 Thread Amos Kong
- Fixed Andreas's mail address On Fri, Jun 13, 2014 at 10:15:00AM +0200, Paolo Bonzini wrote: > libqtest is using g_strdup_printf to format QMP commands, but > this does not work if the argument strings need to be escaped. > Instead, use the fancy %-formatting functionality of QObject. > The only

[Qemu-devel] [PATCH] libqtest: escape strings in QMP commands, fix leak

2014-06-13 Thread Paolo Bonzini
libqtest is using g_strdup_printf to format QMP commands, but this does not work if the argument strings need to be escaped. Instead, use the fancy %-formatting functionality of QObject. The only change required in tests is that strings have to be formatted as %s, not '%s' or \"%s\". Luckily this