From 6ac2c7b682a427fc80d142e80e73858346a2d024 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Sun, 14 Aug 2022 14:03:02 -0700 Subject: [PATCH] We must use the CSUM_CHUNK size in the non-openssl MD4 code. --- checksum.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/checksum.c b/checksum.c index fb8c0a09..758b489d 100644 --- a/checksum.c +++ b/checksum.c @@ -418,8 +418,8 @@ void file_checksum(const char *fname, const STRUCT_STAT *st_p, char *sum) mdfour_begin(&m); - for (i = 0; i + CHUNK_SIZE <= len; i += CHUNK_SIZE) - mdfour_update(&m, (uchar *)map_ptr(buf, i, CHUNK_SIZE), CHUNK_SIZE); + for (i = 0; i + CSUM_CHUNK <= len; i += CSUM_CHUNK) + mdfour_update(&m, (uchar *)map_ptr(buf, i, CSUM_CHUNK), CSUM_CHUNK); /* Prior to version 27 an incorrect MD4 checksum was computed * by failing to call mdfour_tail() for block sizes that -- 2.47.2