mirror of
https://github.com/NixOS/nix.git
synced 2024-11-26 08:42:30 +00:00
* Disallow unescaped $ in string literals.
This commit is contained in:
parent
0064599a27
commit
7276e194ee
@ -73,10 +73,7 @@ inherit { return INHERIT; }
|
|||||||
}
|
}
|
||||||
|
|
||||||
\" { BEGIN(STRING); return '"'; }
|
\" { BEGIN(STRING); return '"'; }
|
||||||
<STRING>([^\$\"\\]|\\.|\$[^\{\$])+ {
|
<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. */
|
|
||||||
yylval->t = unescapeStr(yytext); /* !!! alloc */
|
yylval->t = unescapeStr(yytext); /* !!! alloc */
|
||||||
return STR;
|
return STR;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user