From: Aki Tuomi Date: Fri, 1 Dec 2017 09:53:50 +0000 (+0200) Subject: lib: murmurhash3 - Fix 128 bit hash on 32 bit systems X-Git-Tag: 2.3.0.rc1~291 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=aa6cd0d62ab34864c476c7fb3344e8e4ba035261;p=thirdparty%2Fdovecot%2Fcore.git lib: murmurhash3 - Fix 128 bit hash on 32 bit systems --- diff --git a/src/lib/murmurhash3.c b/src/lib/murmurhash3.c index 7d5a212471..ff2dbe94d2 100644 --- a/src/lib/murmurhash3.c +++ b/src/lib/murmurhash3.c @@ -295,8 +295,8 @@ void murmurhash3_128(const void *key, size_t len, uint32_t seed, memcpy(out, &h1, sizeof(h1)); memcpy(out+sizeof(h1), &h2, sizeof(h2)); - memcpy(out+sizeof(h2), &h3, sizeof(h3)); - memcpy(out+sizeof(h3), &h4, sizeof(h4)); + memcpy(out+sizeof(h1)*2, &h3, sizeof(h3)); + memcpy(out+sizeof(h1)*3, &h4, sizeof(h4)); } #endif