From f1e32ed35429a9890697efabca63dd9c88b55c2e Mon Sep 17 00:00:00 2001 From: Eric Leblond Date: Tue, 11 Jul 2017 00:32:52 +0200 Subject: parser: error if needed at EOF Signed-off-by: Eric Leblond Signed-off-by: Pablo Neira Ayuso --- src/parser_bison.y | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/parser_bison.y') diff --git a/src/parser_bison.y b/src/parser_bison.y index abc41a6b..03b13720 100644 --- a/src/parser_bison.y +++ b/src/parser_bison.y @@ -760,6 +760,8 @@ line : common_block { $$ = NULL; } } else list_splice_tail(&list, &state->cmds); } + if (state->nerrs) + YYABORT; $$ = NULL; YYACCEPT; -- cgit v1.2.3