From 5a1d092ae1f184ab5349728587405bacafcd1aaf Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Fri, 22 Apr 2011 11:27:16 -0700 Subject: [PATCH] Fix a potential crash when trying to find a better block match. --- match.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/match.c b/match.c index 658d7866..154099d1 100644 --- a/match.c +++ b/match.c @@ -238,7 +238,7 @@ static void hash_search(int f,struct sum_struct *s, aligned_offset += s->blength; aligned_i++; } - if (offset == aligned_offset) { + if (offset == aligned_offset && aligned_i < s->count) { if (i != aligned_i) { if (sum != s->sums[aligned_i].sum1 || l != s->sums[aligned_i].len -- 2.47.3