(getid): Restrict identifier syntax: outlaw conditional operators <>=#
and meta-character ".
This commit is contained in:
parent
2faa68c6e3
commit
15635c25ae
1 changed files with 2 additions and 1 deletions
|
@ -124,7 +124,8 @@ static int
|
||||||
getid(FILE *fp, char *buf)
|
getid(FILE *fp, char *buf)
|
||||||
{
|
{
|
||||||
int n;
|
int n;
|
||||||
if (fscanf(fp, "%1023[^#() \t\n]%n", buf, &n) != 1 || !isalpha(buf[0]))
|
if (fscanf(fp, "%1023[^#()<>=#\" \t\n]%n", buf, &n) != 1
|
||||||
|
|| !isalpha(buf[0]))
|
||||||
return -1;
|
return -1;
|
||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue