diff options
author | João Valverde <j@v6e.pt> | 2022-04-15 18:59:13 +0100 |
---|---|---|
committer | João Valverde <j@v6e.pt> | 2022-04-15 22:51:15 +0100 |
commit | af878388fe49a123b3b4b307bb6c37c763840d41 (patch) | |
tree | 2109e31b4ac5fe77c41da42a1507f2501a276a46 /epan/dfilter | |
parent | e364444b245a7605fdf1cc4b704ce738b99066d7 (diff) |
dfilter: Fix scanning of strings
The code was ignoring a SCAN_FAILED return value.
Diffstat (limited to 'epan/dfilter')
-rw-r--r-- | epan/dfilter/scanner.l | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/epan/dfilter/scanner.l b/epan/dfilter/scanner.l index 619eb8ccf0..f4c4f46971 100644 --- a/epan/dfilter/scanner.l +++ b/epan/dfilter/scanner.l @@ -263,10 +263,10 @@ hyphen-bytes {hex2}(-{hex2})+ BEGIN(INITIAL); update_string_loc(yyextra, yytext); g_string_append_c(yyextra->quoted_string, '"'); - set_lval_quoted_string(yyextra, TOKEN_STRING, yyextra->quoted_string); + int token = set_lval_quoted_string(yyextra, TOKEN_STRING, yyextra->quoted_string); yyextra->quoted_string = NULL; yyextra->string_loc.col_start = -1; - return TOKEN_STRING; + return token; } <DQUOTE>\\[0-7]{1,3} { @@ -361,10 +361,10 @@ hyphen-bytes {hex2}(-{hex2})+ BEGIN(INITIAL); update_string_loc(yyextra, yytext); g_string_append_c(yyextra->quoted_string, '\''); - set_lval_charconst(yyextra, TOKEN_CHARCONST, yyextra->quoted_string); + int token = set_lval_charconst(yyextra, TOKEN_CHARCONST, yyextra->quoted_string); yyextra->quoted_string = NULL; yyextra->string_loc.col_start = -1; - return TOKEN_CHARCONST; + return token; } <SQUOTE>\\. { |