aboutsummaryrefslogtreecommitdiff
path: root/exec.c
diff options
context:
space:
mode:
authorPaolo Bonzini <pbonzini@redhat.com>2011-12-18 17:05:04 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2011-12-19 10:27:33 -0600
commit47c6d3ecdfc3fc354cf996f873a9f854c2325160 (patch)
tree22b4a08719fb8b544b9a7e5e611c9818229bd4ec /exec.c
parentb1746dddfc94f9c98b9b9c1a6f25c064f0f58a5a (diff)
qapi: protect against NULL QObject in qmp_input_get_object
A NULL qobj can occur when a parameter is fetched via qdict_get, but the parameter is not in the command. By returning NULL, the caller can choose whether to raise a missing parameter error, an invalid parameter type error, or use a default value. For example, qom-set could can use this to reset a property to its default value, though at this time it will fail with "Invalid parameter type". In any case, anything is better than crashing! Reviewed-by: Anthony Liguori <anthony@codemonkey.ws> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'exec.c')
0 files changed, 0 insertions, 0 deletions