From b86e2a360968dc819f5e7cf96b6f470428b31632 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Stig=20Bj=C3=B8rlykke?= Date: Tue, 27 Oct 2015 08:53:44 +0100 Subject: [PATCH] Dfilter: Mark an error in %syntax_error MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Because of a change in lemon the %parse_failure is not always called. Bug: 11637 Change-Id: Iea218aeee10e20f29461169829a10345bbdac903 Reviewed-on: https://code.wireshark.org/review/11302 Petri-Dish: Stig Bjørlykke Tested-by: Petri Dish Buildbot Tested-by: Jeff Morriss Reviewed-by: Stig Bjørlykke --- epan/dfilter/grammar.lemon | 2 ++ 1 file changed, 2 insertions(+) diff --git a/epan/dfilter/grammar.lemon b/epan/dfilter/grammar.lemon index d3bab21ed5..0ea861d446 100644 --- a/epan/dfilter/grammar.lemon +++ b/epan/dfilter/grammar.lemon @@ -73,6 +73,7 @@ any "error" symbols are shifted, if possible. */ if (!TOKEN) { dfilter_fail(dfw, "Unexpected end of filter string."); + dfw->syntax_error = TRUE; return; } @@ -115,6 +116,7 @@ any "error" symbols are shifted, if possible. */ g_assert_not_reached(); break; } + dfw->syntax_error = TRUE; } /* When a parse fails, mark an error. This occurs after -- 2.34.1