Upfront reject of non stateful statements in set elements. Fixes: 07958ec53830 ("json: add set statement list support") Signed-off-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx> --- src/parser_json.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/parser_json.c b/src/parser_json.c index 053dd81a076f..4c9dc5415445 100644 --- a/src/parser_json.c +++ b/src/parser_json.c @@ -2433,6 +2433,11 @@ static void json_parse_set_stmt_list(struct json_ctx *ctx, stmt_list_free(stmt_list); return; } + if (!(stmt->flags & STMT_F_STATEFUL)) { + stmt_free(stmt); + json_error(ctx, "Unsupported set statements array at index %zd failed.", index); + stmt_list_free(stmt_list); + } list_add(&stmt->list, head); head = &stmt->list; } -- 2.30.2