qemu/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 kvm: add support for -machine kernel_irqchip=split 2015-12-17 17:15:40 +01:00
crypto.json crypto: increase default pbkdf2 time for luks to 2 seconds 2016-09-19 16:30:45 +01:00
event.json qmp event: Refactor QUORUM_REPORT_BAD 2016-03-14 16:46:43 +01:00
introspect.json qapi: Use anonymous bases in QMP flat unions 2016-03-18 10:29:26 +01:00
Makefile.objs qapi: Add new clone visitor 2016-07-06 10:52:04 +02:00
opts-visitor.c opts-visitor: Favor new visit_free() function 2016-07-06 10:52:04 +02:00
qapi-clone-visitor.c qapi: Add new clone visitor 2016-07-06 10:52:04 +02:00
qapi-dealloc-visitor.c qapi: Add new visit_free() function 2016-07-06 10:52:04 +02:00
qapi-util.c include/qemu/osdep.h: Don't include qapi/error.h 2016-03-22 22:20:15 +01:00
qapi-visit-core.c qapi: Add new clone visitor 2016-07-06 10:52:04 +02:00
qmp-dispatch.c qapi: Improve use of qmp/types.h 2016-07-06 10:52:03 +02:00
qmp-event.c qapi: Clean up includes 2016-02-04 17:41:30 +00:00
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 qmp/hmp: add rocker device support 2015-06-12 13:42:17 +01:00
string-input-visitor.c string-input-visitor: Favor new visit_free() function 2016-07-06 10:52:04 +02:00
string-output-visitor.c qapi: Add new visit_complete() function 2016-07-06 10:52:04 +02:00
trace.json trace: Add QAPI/QMP interfaces to query and control per-vCPU tracing state 2016-07-18 18:23:12 +01:00