Re: [Qemu-devel] [PATCH 01/21] qga: Fix crash on non-dictionary QMP argument

2017-02-23 Thread Markus Armbruster
Eric Blake writes: > On 02/23/2017 04:46 PM, Eric Blake wrote: >> On 02/23/2017 03:44 PM, Markus Armbruster wrote: >>> The value of key 'arguments' must be a JSON object. qemu-ga neglects >>> to check, and crashes. To reproduce, send >>> >>> { 'execute': 'guest-sync', 'arguments': [] } >>>

Re: [Qemu-devel] [PATCH 01/21] qga: Fix crash on non-dictionary QMP argument

2017-02-23 Thread Eric Blake
On 02/23/2017 04:46 PM, Eric Blake wrote: > On 02/23/2017 03:44 PM, Markus Armbruster wrote: >> The value of key 'arguments' must be a JSON object. qemu-ga neglects >> to check, and crashes. To reproduce, send >> >> { 'execute': 'guest-sync', 'arguments': [] } >> >> to qemu-ga. >> >> do_qmp_d

Re: [Qemu-devel] [PATCH 01/21] qga: Fix crash on non-dictionary QMP argument

2017-02-23 Thread Eric Blake
On 02/23/2017 03:44 PM, Markus Armbruster wrote: > The value of key 'arguments' must be a JSON object. qemu-ga neglects > to check, and crashes. To reproduce, send > > { 'execute': 'guest-sync', 'arguments': [] } > > to qemu-ga. > > do_qmp_dispatch() uses qdict_get_qdict() to get the argum

[Qemu-devel] [PATCH 01/21] qga: Fix crash on non-dictionary QMP argument

2017-02-23 Thread Markus Armbruster
The value of key 'arguments' must be a JSON object. qemu-ga neglects to check, and crashes. To reproduce, send { 'execute': 'guest-sync', 'arguments': [] } to qemu-ga. do_qmp_dispatch() uses qdict_get_qdict() to get the arguments. When not a JSON object, this gets a null pointer, which fl