]> git.proxmox.com Git - iproute2.git/blame - debian/patches/0005-tc-lexer-let-quotes-actually-start-strings.patch
merge: tc/lexer: let quotes actually start strings
[iproute2.git] / debian / patches / 0005-tc-lexer-let-quotes-actually-start-strings.patch
CommitLineData
0498153c
WB
1From 0df91939df1da6e72fd14ef2788984685e0aeff7 Mon Sep 17 00:00:00 2001
2From: Wolfgang Bumiller <w.bumiller@proxmox.com>
3Date: Thu, 18 Jan 2018 10:26:12 +0100
4Subject: [PATCH iproute2] tc/lexer: let quotes actually start strings
5
6The lexer will go with the longest match, so previously
7the starting double quotes of a string would be swallowed by
8the [^ \t\r\n()]+ pattern leaving the user no way to
9actually use strings with escape sequences.
10Fix this by not allowing this case to start with double
11quotes.
12
13Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
14---
15(Resent as separate thread)
16 tc/emp_ematch.l | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19diff --git a/tc/emp_ematch.l b/tc/emp_ematch.l
20index dc106759..d7a99304 100644
21--- a/tc/emp_ematch.l
22+++ b/tc/emp_ematch.l
23@@ -137,7 +137,7 @@
24 ")" {
25 return yylval.i = *yytext;
26 }
27-[^ \t\r\n()]+ {
28+[^" \t\r\n()][^ \t\r\n()]* {
29 yylval.b = bstr_alloc(yytext);
30 if (yylval.b == NULL)
31 return ERROR;
32--
332.11.0
34