mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 04:43:53 +00:00
Do not allow whitespace in macro names.
Obtained from: OpenBSD (r1.19).
This commit is contained in:
parent
823c0d5f5e
commit
391adcc526
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=302535
|
@ -144,6 +144,14 @@ include : INCLUDE STRING {
|
|||
;
|
||||
|
||||
varset : STRING '=' STRING {
|
||||
char *s = $1;
|
||||
while (*s++) {
|
||||
if (isspace((unsigned char) *s)) {
|
||||
yyerror("macro name cannot contain "
|
||||
"whitespace");
|
||||
YYERROR;
|
||||
}
|
||||
}
|
||||
if (symset($1, $3, 0) == -1)
|
||||
fatal("cannot store variable");
|
||||
free($1);
|
||||
|
|
Loading…
Reference in a new issue