]> git.ipfire.org Git - thirdparty/nftables.git/commit
JSON: Review set elem expressions
authorPhil Sutter <phil@nwl.cc>
Mon, 28 May 2018 16:51:01 +0000 (18:51 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Fri, 1 Jun 2018 07:16:48 +0000 (09:16 +0200)
commit25ccb4587de81e1b348e4e2f5404e70097ea8ec9
tree7a03f4c44a777feecedac089c7203c4591cb6381
parent1c01c8e24e749e7f61b3cd1f4cf4ca8dc32ffd65
JSON: Review set elem expressions

* There is no need to prefix element-specific properties with 'elem_',
  they can't conflict.
* In json_parse_set_stmt(), searching for above properties is pointless
  since that's already done by called function.
* Fix potential NULL-pointer deref in json_parse_set_elem_expr_stmt():
  json_parse_flagged_expr() may return NULL.

Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
src/json.c
src/parser_json.c
tests/py/ip/flowtable.t.json
tests/py/ip/flowtable.t.json.output [new file with mode: 0644]
tests/py/ip6/flowtable.t.json