X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/a261989cda6f671352e6323f11d2d98e923c622e..6aaf8d8c1041b524d985bf09b9a3f5e371cf8ac2:/match.c diff --git a/match.c b/match.c index adc298e7..ee8e565f 100644 --- a/match.c +++ b/match.c @@ -246,7 +246,8 @@ static void hash_search(int f,struct sum_struct *s, match. The 3 reads are caused by the running match, the checksum update and the literal send. */ - if (offset-last_match >= CHUNK_SIZE+s->n && + if (offset > last_match && + offset-last_match >= CHUNK_SIZE+s->n && (end-offset > CHUNK_SIZE)) { matched(f,s,buf,offset - s->n, -2); }