mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-03-28 09:56:57 +00:00
qapi: Fix object input visit beyond end of list
Backports commit 1f41a645b65530859bf5984aa08e103bb452b473 from qemu
This commit is contained in:
parent
ac1a61af47
commit
67cb4b0900
|
@ -121,10 +121,15 @@ static QObject *qobject_input_try_get_object(QObjectInputVisitor *qiv,
|
|||
} else {
|
||||
assert(qobject_type(qobj) == QTYPE_QLIST);
|
||||
assert(!name);
|
||||
ret = qlist_entry_obj(tos->entry);
|
||||
assert(ret);
|
||||
if (tos->entry) {
|
||||
ret = qlist_entry_obj(tos->entry);
|
||||
if (consume) {
|
||||
tos->entry = qlist_next(tos->entry);
|
||||
}
|
||||
} else {
|
||||
ret = NULL;
|
||||
}
|
||||
if (consume) {
|
||||
tos->entry = qlist_next(tos->entry);
|
||||
tos->index++;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue