netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Garver <eric@garver.life>
To: netfilter-devel@vger.kernel.org
Cc: Pablo Neira Ayuso <pablo@netfilter.org>,
	Phil Sutter <phil@nwl.cc>, Stefano Brivio <sbrivio@redhat.com>
Subject: [PATCH 1/2] parser_json: fix parsing prefix inside concat
Date: Thu, 20 Feb 2020 12:12:41 -0500	[thread overview]
Message-ID: <20200220171242.15240-1-eric@garver.life> (raw)

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


             reply	other threads:[~2020-02-20 17:12 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-20 17:12 Eric Garver [this message]
2020-02-20 17:12 ` [PATCH 2/2] tests: shell: json parsing prefix inside concat Eric Garver
2020-02-21 18:16 ` [PATCH 1/2] parser_json: fix " Eric Garver

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200220171242.15240-1-eric@garver.life \
    --to=eric@garver.life \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=pablo@netfilter.org \
    --cc=phil@nwl.cc \
    --cc=sbrivio@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).