diff mbox series

[1/2] parser_json: fix parsing prefix inside concat

Message ID 20200220171242.15240-1-eric@garver.life
State Changes Requested
Delegated to: Pablo Neira
Headers show
Series [1/2] parser_json: fix parsing prefix inside concat | expand

Commit Message

Eric Garver Feb. 20, 2020, 5:12 p.m. UTC
Found while testing set intervals + concatenations. Thanks to Stefano
Brivio for pointing me to the fix.

Signed-off-by: Eric Garver <eric@garver.life>
---
 src/parser_json.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Eric Garver Feb. 21, 2020, 6:16 p.m. UTC | #1
On Thu, Feb 20, 2020 at 12:12:41PM -0500, Eric Garver wrote:
> Found while testing set intervals + concatenations. Thanks to Stefano
> Brivio for pointing me to the fix.
> 
> Signed-off-by: Eric Garver <eric@garver.life>
> ---
>  src/parser_json.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/src/parser_json.c b/src/parser_json.c
> index 85082ccee7ef..77abca032902 100644
> --- a/src/parser_json.c
> +++ b/src/parser_json.c
> @@ -1058,7 +1058,7 @@ static struct expr *json_parse_concat_expr(struct json_ctx *ctx,
>  	}
>  
>  	json_array_foreach(root, index, value) {
> -		tmp = json_parse_primary_expr(ctx, value);
> +		tmp = json_parse_rhs_expr(ctx, value);
>  		if (!tmp) {
>  			json_error(ctx, "Parsing expr at index %zd failed.", index);
>  			expr_free(expr);
> -- 
> 2.23.0

Self NAK. This breaks "payload" inside of "concat".
Any help here would be appreciated. :)

Thanks.
Eric.
diff mbox series

Patch

diff --git a/src/parser_json.c b/src/parser_json.c
index 85082ccee7ef..77abca032902 100644
--- a/src/parser_json.c
+++ b/src/parser_json.c
@@ -1058,7 +1058,7 @@  static struct expr *json_parse_concat_expr(struct json_ctx *ctx,
 	}
 
 	json_array_foreach(root, index, value) {
-		tmp = json_parse_primary_expr(ctx, value);
+		tmp = json_parse_rhs_expr(ctx, value);
 		if (!tmp) {
 			json_error(ctx, "Parsing expr at index %zd failed.", index);
 			expr_free(expr);