From 161fba6903024ebecdb40da429d135b442e40d52 Mon Sep 17 00:00:00 2001 From: Wayne Davison Date: Sun, 18 Mar 2007 06:28:51 +0000 Subject: [PATCH] Put the checksum seed at the end of the checksum2 buffer in md5 mode. --- checksum.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/checksum.c b/checksum.c index fe8a64c0..10cb3667 100644 --- a/checksum.c +++ b/checksum.c @@ -56,11 +56,11 @@ void get_checksum2(char *buf, int32 len, char *sum) if (protocol_version >= 30) { uchar seedbuf[4]; md5_begin(&m); + md5_update(&m, (uchar *)buf, len); if (checksum_seed) { SIVAL(seedbuf, 0, checksum_seed); md5_update(&m, seedbuf, 4); } - md5_update(&m, (uchar *)buf, len); md5_result(&m, (uchar *)sum); } else { int32 i; -- 2.34.1