commit e0123be7a908d1a4b7c43d0817b9ecccf2bd1416 Author: Pablo Neira Ayuso Date: Thu Mar 27 16:32:16 2025 +0100 parser_json: reject empty concatention in set key and data Signed-off-by: Pablo Neira Ayuso diff --git a/src/parser_json.c b/src/parser_json.c index 17bc38b565ae..513e0b10f028 100644 --- a/src/parser_json.c +++ b/src/parser_json.c @@ -1729,6 +1729,13 @@ static struct expr *json_parse_dtype_expr(struct json_ctx *ctx, json_t *root) } compound_expr_add(expr, i); } + + if (list_empty(&expr->expressions)) { + json_error(ctx, "Empty concatenation"); + expr_free(expr); + return NULL; + } + return expr; } else if (json_is_object(root)) { const char *key;