From d00ec7f9bdf5faf72719a01d36e3749b13e86d2f Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Sun, 14 Sep 2003 21:32:47 +0000 Subject: [PATCH] Detect excessively larhe files. --- shredtree.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/shredtree.c b/shredtree.c index 9c81542..e74466d 100644 --- a/shredtree.c +++ b/shredtree.c @@ -181,6 +181,12 @@ int shredfile(struct filehdr_t *file, int braceline = 0; linecount++; + if (linecount >= MAX_LINENUM) + { + fprintf(stderr, "comparator: %s too large, only first %d lines will be compared.\n", file->name, MAX_LINENUM-1); + break; + } + if (remove_braces) { char *cp; -- 2.43.0