From: Wolfgang Bumiller Date: Mon, 22 Jan 2018 10:53:46 +0000 (+0100) Subject: tc/lexer: let quotes actually start strings X-Git-Tag: v4.15.0~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7ac29190dbbc03ee2e60406ba8c584ac3c18c6c9;p=thirdparty%2Fiproute2.git tc/lexer: let quotes actually start strings The lexer will go with the longest match, so previously the starting double quotes of a string would be swallowed by the [^ \t\r\n()]+ pattern leaving the user no way to actually use strings with escape sequences. Fix this by not allowing this case to start with double quotes. Signed-off-by: Wolfgang Bumiller --- diff --git a/tc/emp_ematch.l b/tc/emp_ematch.l index dc1067591..d7a99304b 100644 --- a/tc/emp_ematch.l +++ b/tc/emp_ematch.l @@ -137,7 +137,7 @@ ")" { return yylval.i = *yytext; } -[^ \t\r\n()]+ { +[^" \t\r\n()][^ \t\r\n()]* { yylval.b = bstr_alloc(yytext); if (yylval.b == NULL) return ERROR;