]> git.ipfire.org Git - thirdparty/nftables.git/commit
src: fix 'describe' command when passing wrong expressions
authorPablo Neira Ayuso <pablo@netfilter.org>
Tue, 16 Sep 2014 09:03:57 +0000 (11:03 +0200)
committerPablo Neira Ayuso <pablo@netfilter.org>
Wed, 17 Sep 2014 08:17:38 +0000 (10:17 +0200)
commit55ee009aaa650553868509081f2e2c5e2915008c
treed9217f803b7b801f063b0f1204f7eab55bbbee9f
parent102c30013e622a9ffdccace52dee2552b06e5d3d
src: fix 'describe' command when passing wrong expressions

Before this patch:

 # nft describe tcp foo
 value expression, datatype inet_proto (Internet protocol) (basetype integer), 8 bits
 Segmentation fault

After this patch:

 # nft describe tcp foo
 <cmdline>:1:14-16: Error: syntax error, unexpected string, expecting end of file or newline or semicolon
 describe tcp foo
              ^^^

Reported-by: Kevin Fenzi <kevin@scrye.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
include/rule.h
src/evaluate.c
src/parser.y
src/rule.c