]> Zhao Yanbai Git Server - minix.git/commitdiff
stopgap measure against elvis going nuts when files that are too large
authorBen Gras <ben@minix3.org>
Sun, 21 Dec 2008 04:01:01 +0000 (04:01 +0000)
committerBen Gras <ben@minix3.org>
Sun, 21 Dec 2008 04:01:01 +0000 (04:01 +0000)
are opened.

commands/elvis/tmp.c

index 77ae0ef88e6b0f01e77059eb38e804d367acda8c..9102169d8b324fb7be030840ef26403268718407 100755 (executable)
@@ -367,6 +367,9 @@ int tmpstart(filename)
                                }
                                nbytes++;
                        }
+                       if(i >= MAXBLKS) {
+                               FAIL("Too many blocks: %d.", i);
+                       }
                        lnum[i - 1] = nlines;
                }
 FoundEOF: