summaryrefslogtreecommitdiffstats
path: root/Source/kwsys/MD5.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2020-04-15 10:41:18 (GMT)
committerBrad King <brad.king@kitware.com>2020-04-15 10:41:18 (GMT)
commit87a06afce3b7f32e3c6e0544c47e863d988bafdc (patch)
tree1a9ba1a7bd07755d830caea82da678f1446a7526 /Source/kwsys/MD5.c
parentc63fb217c06f388fbe3e9be82279694742dcf81d (diff)
parent1b37136633ab1e81f12d9782ca777b954b463c42 (diff)
downloadCMake-87a06afce3b7f32e3c6e0544c47e863d988bafdc.zip
CMake-87a06afce3b7f32e3c6e0544c47e863d988bafdc.tar.gz
CMake-87a06afce3b7f32e3c6e0544c47e863d988bafdc.tar.bz2
Merge branch 'upstream-KWSys' into update-kwsys
# By KWSys Upstream * upstream-KWSys: KWSys 2020-04-15 (5ada375f)
Diffstat (limited to 'Source/kwsys/MD5.c')
-rw-r--r--Source/kwsys/MD5.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/Source/kwsys/MD5.c b/Source/kwsys/MD5.c
index 7ae2630..fb18a5b 100644
--- a/Source/kwsys/MD5.c
+++ b/Source/kwsys/MD5.c
@@ -417,14 +417,16 @@ static void md5_finish(md5_state_t* pms, md5_byte_t digest[16])
int i;
/* Save the length before padding. */
- for (i = 0; i < 8; ++i)
+ for (i = 0; i < 8; ++i) {
data[i] = (md5_byte_t)(pms->count[i >> 2] >> ((i & 3) << 3));
+ }
/* Pad to 56 bytes mod 64. */
md5_append(pms, pad, ((55 - (pms->count[0] >> 3)) & 63) + 1);
/* Append the length. */
md5_append(pms, data, 8);
- for (i = 0; i < 16; ++i)
+ for (i = 0; i < 16; ++i) {
digest[i] = (md5_byte_t)(pms->abcd[i >> 2] >> ((i & 3) << 3));
+ }
}
#if defined(__clang__) && !defined(__INTEL_COMPILER)