From 523fdf272938e2102047ef3ac66daa1c9652a141 Mon Sep 17 00:00:00 2001 From: Ben Gras Date: Sun, 21 Dec 2008 04:01:01 +0000 Subject: [PATCH] stopgap measure against elvis going nuts when files that are too large are opened. --- commands/elvis/tmp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/commands/elvis/tmp.c b/commands/elvis/tmp.c index 77ae0ef88..9102169d8 100755 --- a/commands/elvis/tmp.c +++ b/commands/elvis/tmp.c @@ -367,6 +367,9 @@ int tmpstart(filename) } nbytes++; } + if(i >= MAXBLKS) { + FAIL("Too many blocks: %d.", i); + } lnum[i - 1] = nlines; } FoundEOF: -- 2.44.0