(xundump): Fix rev. 1.19.

This commit is contained in:
Markus Armbruster 2005-12-03 16:15:16 +00:00
parent 86a59e4de4
commit 2ebc947969

View file

@ -494,7 +494,10 @@ xundump(FILE *fp, char *file, int expected_table)
return -1;
ungetc(ch, fp);
if (fscanf(fp, "XDUMP%*[ \t]%63[^ \t#\n]%*[ \t]%*[^ \t#\n]", name) != 1)
res = -1;
if (fscanf(fp, "XDUMP%*[ \t]%63[^ \t#\n]%*[ \t]%*[^ \t#\n]%n",
name, &res) != 1
|| res < 0)
return gripe("Expected XDUMP header");
if (skipfs(fp) != '\n')
return gripe("Junk after XDUMP header");