Fix overflow of sum2 buffer for sha1 rolling checksums.
[rsync.git] / match.c
diff --git a/match.c b/match.c
index 6243994caa52799cd49d19bf0b5b6a305e7f04d3..192b154a2dd3a28ca1ef6d75fbcafd5a2c7c84a9 100644 (file)
--- a/match.c
+++ b/match.c
@@ -142,7 +142,7 @@ static void hash_search(int f,struct sum_struct *s,
 {
        OFF_T offset, aligned_offset, end;
        int32 k, want_i, aligned_i, backup;
-       char sum2[SUM_LENGTH];
+       char sum2[MAX_DIGEST_LEN];
        uint32 s1, s2, sum;
        int more;
        schar *map;