From 572489ec8936be0dfa1137f497d295e21f9ce693 Mon Sep 17 00:00:00 2001 From: Bastien Montagne Date: Sun, 22 Mar 2015 21:13:43 +0100 Subject: Fix wrong sizeof() in new ghash hashing helpers code. Spotted by Coverity. --- source/blender/blenlib/intern/BLI_ghash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/blenlib/intern/BLI_ghash.c b/source/blender/blenlib/intern/BLI_ghash.c index 49d3cecafed..cd86bb831f4 100644 --- a/source/blender/blenlib/intern/BLI_ghash.c +++ b/source/blender/blenlib/intern/BLI_ghash.c @@ -1004,7 +1004,7 @@ unsigned int BLI_ghashutil_uinthash_v4(const unsigned int key[4]) } unsigned int BLI_ghashutil_uinthash_v4_murmur(const unsigned int key[4]) { - return BLI_hash_mm2((const unsigned char *)key, sizeof(key), 0); + return BLI_hash_mm2((const unsigned char *)key, sizeof(int) * 4 /* sizeof(key) */, 0); } bool BLI_ghashutil_uinthash_v4_cmp(const void *a, const void *b) -- cgit v1.2.3