(getid): Restrict identifier syntax: outlaw conditional operators <>=#

and meta-character ".
This commit is contained in:
Markus Armbruster 2006-06-01 18:09:40 +00:00
parent 2faa68c6e3
commit 15635c25ae

View file

@ -124,7 +124,8 @@ static int
getid(FILE *fp, char *buf)
{
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 n;
}