]> git.ipfire.org Git - thirdparty/rsync.git/commitdiff
Change odd-ball map_ptr() to use remainder like the others.
authorWayne Davison <wayne@opencoder.net>
Mon, 25 May 2020 03:38:48 +0000 (20:38 -0700)
committerWayne Davison <wayne@opencoder.net>
Mon, 25 May 2020 03:38:48 +0000 (20:38 -0700)
checksum.c

index 4aa9f4b7422192381cd76f8ae374dfb6d2538bfc..fb771402fab5210baeb609f8b8ce2e6511818ead 100644 (file)
@@ -373,7 +373,7 @@ void file_checksum(const char *fname, const STRUCT_STAT *st_p, char *sum)
 
                remainder = (int32)(len - i);
                if (remainder > 0)
-                       XXH64_update(state, (uchar *)map_ptr(buf, i, CHUNK_SIZE), remainder);
+                       XXH64_update(state, (uchar *)map_ptr(buf, i, remainder), remainder);
                SIVAL64(sum, 0, XXH64_digest(state));
 
                XXH64_freeState(state);