From: Eric S. Raymond Date: Sun, 14 Sep 2003 15:23:34 +0000 (+0000) Subject: Fix a range to avoid a core dump. X-Git-Tag: 1.6~30 X-Git-Url: http://thyrsus.com/gitweb/?a=commitdiff_plain;h=9941ea0d867a8c71bad36017e5fe01c9381ef633;p=comparator.git Fix a range to avoid a core dump. --- diff --git a/report.c b/report.c index 56a45b8..340970a 100644 --- a/report.c +++ b/report.c @@ -135,7 +135,7 @@ static int collapse_ranges(struct match_t *reduced, int nonuniques) /* time to merge overlapping shreds */ for (sp = reduced; sp < reduced + nonuniques; sp++) - for (tp = sp + 1; !compare_files(sp, tp); tp++) + for (tp = sp + 1; !compare_files(sp, tp) && tp < reduced + nonuniques; tp++) { #ifdef DEBUG printf("Trying merge of %d into %d\n", tp-reduced, sp-reduced);