From 55ee009aaa650553868509081f2e2c5e2915008c Mon Sep 17 00:00:00 2001 From: Pablo Neira Ayuso Date: Tue, 16 Sep 2014 11:03:57 +0200 Subject: 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 :1:14-16: Error: syntax error, unexpected string, expecting end of file or newline or semicolon describe tcp foo ^^^ Reported-by: Kevin Fenzi Signed-off-by: Pablo Neira Ayuso --- src/evaluate.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/evaluate.c') diff --git a/src/evaluate.c b/src/evaluate.c index f66a8ea3..34558fcb 100644 --- a/src/evaluate.c +++ b/src/evaluate.c @@ -1443,6 +1443,7 @@ int cmd_evaluate(struct eval_ctx *ctx, struct cmd *cmd) case CMD_RENAME: case CMD_EXPORT: case CMD_MONITOR: + case CMD_DESCRIBE: return 0; default: BUG("invalid command operation %u\n", cmd->op); -- cgit v1.2.3