parser json BUGFIX invalid metadata parsing
@@ -797,6 +797,8 @@ next_entry:
LOG_LOCSET(snode, NULL, NULL, NULL);
while (status != LYJSON_OBJECT_CLOSED) {
+ LY_CHECK_GOTO(status != LYJSON_OBJECT, representation_error);
+
lydjson_parse_name(lydctx->jsonctx->value, lydctx->jsonctx->value_len, &name, &name_len, &prefix, &prefix_len, &is_attr);
lyjson_ctx_give_dynamic_value(lydctx->jsonctx, &dynamic_prefname);
