提交 04f8c053 编写于 作者: L Luiz Capitulino

QMP: Check "arguments" member's type

Otherwise the following input crashes QEMU:

{ "execute": "migrate", "arguments": "tcp:0:4446" }
Signed-off-by: NLuiz Capitulino <lcapitulino@redhat.com>
上级 abaf2f52
......@@ -4437,6 +4437,9 @@ static void handle_qmp_command(JSONMessageParser *parser, QList *tokens)
obj = qdict_get(input, "arguments");
if (!obj) {
args = qdict_new();
} else if (qobject_type(obj) != QTYPE_QDICT) {
qerror_report(QERR_QMP_BAD_INPUT_OBJECT_MEMBER, "arguments", "object");
goto err_input;
} else {
args = qobject_to_qdict(obj);
QINCREF(args);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册