Do not allow whitespace in macro names.
Obtained from: OpenBSD (r1.19).
This commit is contained in:
parent
823c0d5f5e
commit
391adcc526
@ -144,6 +144,14 @@ include : INCLUDE STRING {
|
|||||||
;
|
;
|
||||||
|
|
||||||
varset : STRING '=' 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)
|
if (symset($1, $3, 0) == -1)
|
||||||
fatal("cannot store variable");
|
fatal("cannot store variable");
|
||||||
free($1);
|
free($1);
|
||||||
|
Loading…
Reference in New Issue
Block a user