diff --git a/src/lib/common/xundump.c b/src/lib/common/xundump.c index 27b70142..02697e8d 100644 --- a/src/lib/common/xundump.c +++ b/src/lib/common/xundump.c @@ -647,6 +647,11 @@ xundump(FILE *fp, char *file, int expected_table) free(fldidx); free(fldca); + /* Skip empty lines so that callers can easily check for EOF */ + while ((ch = skipfs(fp)) == '\n') + lineno++; + ungetc(ch, fp); + return type; }