]> git.proxmox.com Git - iproute2.git/commitdiff
merge: tc/lexer: let quotes actually start strings
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 23 Jan 2018 07:49:06 +0000 (08:49 +0100)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Tue, 23 Jan 2018 08:10:24 +0000 (09:10 +0100)
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
debian/patches/0005-tc-lexer-let-quotes-actually-start-strings.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/0005-tc-lexer-let-quotes-actually-start-strings.patch b/debian/patches/0005-tc-lexer-let-quotes-actually-start-strings.patch
new file mode 100644 (file)
index 0000000..cd2d6e1
--- /dev/null
@@ -0,0 +1,34 @@
+From 0df91939df1da6e72fd14ef2788984685e0aeff7 Mon Sep 17 00:00:00 2001
+From: Wolfgang Bumiller <w.bumiller@proxmox.com>
+Date: Thu, 18 Jan 2018 10:26:12 +0100
+Subject: [PATCH iproute2] 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 <w.bumiller@proxmox.com>
+---
+(Resent as separate thread)
+ tc/emp_ematch.l | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/tc/emp_ematch.l b/tc/emp_ematch.l
+index dc106759..d7a99304 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;
+-- 
+2.11.0
+
index aca47b3c6155ffd1b65809852975ad15e29461d1..7e61765e21098bf85ccf24d199ad23309f5f82f5 100644 (file)
@@ -1,3 +1,4 @@
 0001-Add-moo-feature.patch
 0002-txtdocs.patch
 0004-sync-iptables-header.patch
 0001-Add-moo-feature.patch
 0002-txtdocs.patch
 0004-sync-iptables-header.patch
+0005-tc-lexer-let-quotes-actually-start-strings.patch