]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: murmurhash3 - Fix 128 bit hash on 32 bit systems
authorAki Tuomi <aki.tuomi@dovecot.fi>
Fri, 1 Dec 2017 09:53:50 +0000 (11:53 +0200)
committerAki Tuomi <aki.tuomi@dovecot.fi>
Fri, 1 Dec 2017 09:53:50 +0000 (11:53 +0200)
src/lib/murmurhash3.c

index 7d5a2124712bc9b879543767767fd9435ede1917..ff2dbe94d2603e2b4d488626d8e29728d86567fd 100644 (file)
@@ -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