Commit 161fba69 authored by Wayne Davison's avatar Wayne Davison

Put the checksum seed at the end of the checksum2 buffer in md5 mode.

parent 55edf18c
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment