mirror of
https://github.com/yuzu-emu/unicorn.git
synced 2025-08-04 10:21:15 +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 {
|
} else {
|
||||||
assert(qobject_type(qobj) == QTYPE_QLIST);
|
assert(qobject_type(qobj) == QTYPE_QLIST);
|
||||||
assert(!name);
|
assert(!name);
|
||||||
|
if (tos->entry) {
|
||||||
ret = qlist_entry_obj(tos->entry);
|
ret = qlist_entry_obj(tos->entry);
|
||||||
assert(ret);
|
|
||||||
if (consume) {
|
if (consume) {
|
||||||
tos->entry = qlist_next(tos->entry);
|
tos->entry = qlist_next(tos->entry);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ret = NULL;
|
||||||
|
}
|
||||||
|
if (consume) {
|
||||||
tos->index++;
|
tos->index++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue