Index: read.c =================================================================== --- read.c (revision 30797) +++ read.c (revision 30798) @@ -2878,6 +2878,7 @@ { int c, comment_len; int first_module = 1; + long pos = 0; enum { ST_WS, ST_COMMENT, @@ -2885,6 +2886,7 @@ } state = ST_WS; while ((c = fgetc(f)) != EOF) { + if (pos++ > 1024) break; /* header must be in the first kilobyte */ switch (state) { case ST_MODULE: if (isspace(c))