From: Andrew Tridgell Date: Sun, 3 Feb 2002 01:38:39 +0000 (+0000) Subject: the signed/unsigned change seems to have caused a logic bug on some X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/commitdiff_plain/0e9480317dbb5b8003535a769f4a03bc720d5f5f the signed/unsigned change seems to have caused a logic bug on some systems (only those without large file support perhaps?) this fixes it --- 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); }