]> xenbits.xensource.com Git - libvirt.git/commit
qemuMonitorJSONQueryFdsets: Ensure that JSON arrays are valid before using them
authorPeter Krempa <pkrempa@redhat.com>
Fri, 6 May 2022 10:55:00 +0000 (12:55 +0200)
committerPeter Krempa <pkrempa@redhat.com>
Mon, 16 May 2022 07:15:45 +0000 (09:15 +0200)
commit76709d4f48960365f097166c9f356526c80a5630
treebaddc8ff48ecc25d9939f060ee89c751a66c74ae
parent4e64cded66d24d6c0e4a15d7f9c09448b93d336f
qemuMonitorJSONQueryFdsets: Ensure that JSON arrays are valid before using them

The code didn't check that the reply value is an array and that the
'fds' array is present. This could lead to a crash if qemu wouldn't
return an array in those places.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jonathon Jongsma <jjongsma@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
src/qemu/qemu_monitor_json.c