]> git.proxmox.com Git - mirror_iproute2.git/commitdiff
tc/lexer: let quotes actually start strings
authorWolfgang Bumiller <w.bumiller@proxmox.com>
Mon, 22 Jan 2018 10:53:46 +0000 (11:53 +0100)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 24 Jan 2018 16:49:10 +0000 (08:49 -0800)
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>
tc/emp_ematch.l

index dc1067591a96443e8f6db796851e92ca3653f00b..d7a99304ba14c7a7ee59795f4344b960a39780ae 100644 (file)
 ")"                                    {
                                                return yylval.i = *yytext;
                                        }
-[^ \t\r\n()]+                          {
+[^" \t\r\n()][^ \t\r\n()]*             {
                                                yylval.b = bstr_alloc(yytext);
                                                if (yylval.b == NULL)
                                                        return ERROR;