]> git.ipfire.org Git - thirdparty/nftables.git/commit
parser_json: Catch nonsense ops in match statement
authorPhil Sutter <phil@nwl.cc>
Wed, 13 Sep 2023 20:07:46 +0000 (22:07 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 3 Nov 2023 11:23:37 +0000 (12:23 +0100)
commit5114ab50f786709cb2ac53a6bf006f1c40718526
tree4aa966bbf5230d511bc0b209dca43c8e145fa182
parent7324e3f693e3be93f31ce18d5b0d809abf2a8981
parser_json: Catch nonsense ops in match statement

commit 7df0b2f1a1c64e2bdc652fd2418b4f7218c93f1f upstream.

Since expr_op_symbols array includes binary operators and more, simply
checking the given string matches any of the elements is not sufficient.

Fixes: 586ad210368b7 ("libnftables: Implement JSON parser")
Signed-off-by: Phil Sutter <phil@nwl.cc>
src/parser_json.c