]> granicus.if.org Git - curl/commitdiff
multi: fix the transfer hash function
authorDaniel Stenberg <daniel@haxx.se>
Thu, 13 Jun 2019 15:07:59 +0000 (17:07 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Thu, 13 Jun 2019 22:49:35 +0000 (00:49 +0200)
Follow-up from 8b987cc7eb

Reported-by: Tom van der Woerdt
Fixes #4018
Closes #4024

lib/multi.c

index 34a74b8fb68c846d63501e604c0feaecc9bdfc9a..abd8ae563b7be4e86a8c62e419f298015f712387 100644 (file)
@@ -214,7 +214,7 @@ static struct Curl_sh_entry *sh_getentry(struct curl_hash *sh,
 #define TRHASH_SIZE 13
 static size_t trhash(void *key, size_t key_length, size_t slots_num)
 {
-  size_t keyval = (size_t)key; /* this is a data pointer */
+  size_t keyval = (size_t)*(struct Curl_easy **)key;
   (void) key_length;
 
   return (keyval % slots_num);