Index: read.c =================================================================== --- read.c (revision 30797) +++ read.c (revision 30798) @@ -2594,6 +2594,7 @@ gds_init(&tag); while ((c = fgetc(f)) != EOF) { pos++; + if (pos > 1024) break; /* header must be in the first kilobyte */ switch (state) { case ST_WS: if (isspace(c))