summaryrefslogtreecommitdiffstats
path: root/scripts/switch-timer-api
diff options
context:
space:
mode:
authorMarc-André Lureau2016-09-22 22:39:26 +0200
committerMarkus Armbruster2016-10-06 14:47:41 +0200
commitc489780203f9b22aca5539ec7589b7140bdc951f (patch)
tree9df39b1c08c57577681221bbe04f043ba54a947e /scripts/switch-timer-api
parentqmp: fix object-add assert() without props (diff)
downloadqemu-c489780203f9b22aca5539ec7589b7140bdc951f.tar.gz
qemu-c489780203f9b22aca5539ec7589b7140bdc951f.tar.xz
qemu-c489780203f9b22aca5539ec7589b7140bdc951f.zip
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>
Diffstat (limited to 'scripts/switch-timer-api')
0 files changed, 0 insertions, 0 deletions