1
0
mirror of https://github.com/moparisthebest/curl synced 2024-11-16 14:35:03 -05:00

multi: fix the transfer hash function

Follow-up from 8b987cc7eb

Reported-by: Tom van der Woerdt
Fixes #4018
Closes #4024
This commit is contained in:
Daniel Stenberg 2019-06-13 17:07:59 +02:00
parent ff3876046e
commit 6cc18c59a7
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2

View File

@ -214,7 +214,7 @@ static struct Curl_sh_entry *sh_getentry(struct curl_hash *sh,
#define TRHASH_SIZE 13 #define TRHASH_SIZE 13
static size_t trhash(void *key, size_t key_length, size_t slots_num) 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; (void) key_length;
return (keyval % slots_num); return (keyval % slots_num);