diff options
author | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-05-01T15·29+0000 |
---|---|---|
committer | Eelco Dolstra <e.dolstra@tudelft.nl> | 2006-05-01T15·29+0000 |
commit | 7276e194eefc807600e1dcd10566a57e557ed1ad (patch) | |
tree | bff2c4be8c14acf776345df4bf89f70cf475f4b3 | |
parent | 0064599a27ec44880e4ff6fa19f453e610b5ef07 (diff) |
* Disallow unescaped $ in string literals.
-rw-r--r-- | src/libexpr/lexer.l | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/libexpr/lexer.l b/src/libexpr/lexer.l index 47f2bca1e699..bc9a38da42f9 100644 --- a/src/libexpr/lexer.l +++ b/src/libexpr/lexer.l @@ -73,10 +73,7 @@ inherit { return INHERIT; } } \" { BEGIN(STRING); return '"'; } -<STRING>([^\$\"\\]|\\.|\$[^\{\$])+ { -/* Note: a dollar *is* allowed as-is in a string, as long as it's - not followed by a open brace. This should probably be disallowed - eventually. */ +<STRING>([^\$\"\\]|\\.)+ { yylval->t = unescapeStr(yytext); /* !!! alloc */ return STR; } |