qemu-e2k/qapi
Marc-André Lureau c489780203 qapi: Fix crash when 'any' or 'null' parameter is missing
Unlike the other visit methods, visit_type_any() and visit_type_null()
neglect to check whether qmp_input_get_object() succeeded.  They crash
when it fails.  Reproducer:

{ "execute": "qom-set",
  "arguments": { "path": "/machine", "property": "rtc-time" } }

Will crash with:

qapi/qapi-visit-core.c:277: visit_type_any: Assertion `!err != !*obj'
failed

Broken in commit 5c678ee.  Fix by adding the missing error checks.

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-Id: <20160922203927.28241-3-marcandre.lureau@redhat.com>
Reviewed-by: Markus Armbruster <armbru@redhat.com>
[Commit message rephrased]
Signed-off-by: Markus Armbruster <armbru@redhat.com>
2016-10-06 14:47:41 +02:00
..
block-core.json block/qapi: Move 'aio' option to file driver 2016-09-29 14:13:39 +02:00
block.json block: Accept device model name for eject 2016-09-23 13:40:45 +02:00
common.json
crypto.json crypto: increase default pbkdf2 time for luks to 2 seconds 2016-09-19 16:30:45 +01:00
event.json
introspect.json
Makefile.objs
opts-visitor.c
qapi-clone-visitor.c
qapi-dealloc-visitor.c
qapi-util.c
qapi-visit-core.c
qmp-dispatch.c
qmp-event.c
qmp-input-visitor.c qapi: Fix crash when 'any' or 'null' parameter is missing 2016-10-06 14:47:41 +02:00
qmp-output-visitor.c qapi: change QmpOutputVisitor to QSLIST 2016-07-19 13:21:08 +02:00
qmp-registry.c qapi: Support unregistering QMP commands 2016-09-19 17:32:21 +02:00
rocker.json
string-input-visitor.c
string-output-visitor.c
trace.json trace: Add QAPI/QMP interfaces to query and control per-vCPU tracing state 2016-07-18 18:23:12 +01:00