diff options
Diffstat (limited to 'qapi/qapi-visit-core.c')
-rw-r--r-- | qapi/qapi-visit-core.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/qapi/qapi-visit-core.c b/qapi/qapi-visit-core.c index f856286461..b4a0f21b36 100644 --- a/qapi/qapi-visit-core.c +++ b/qapi/qapi-visit-core.c @@ -50,9 +50,10 @@ void visit_start_list(Visitor *v, const char *name, Error **errp) v->start_list(v, name, errp); } -GenericList *visit_next_list(Visitor *v, GenericList **list) +GenericList *visit_next_list(Visitor *v, GenericList **list, size_t size) { - return v->next_list(v, list); + assert(list && size >= sizeof(GenericList)); + return v->next_list(v, list, size); } void visit_end_list(Visitor *v) |