From d125261e8c445953448c93cc3a12e72248ad69cf Mon Sep 17 00:00:00 2001 From: Vladimir Dubrovin <3proxy@3proxy.ru> Date: Tue, 28 Apr 2026 16:32:30 +0300 Subject: [PATCH] fix: hashtables on recsize < 4 --- src/hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/hash.c b/src/hash.c index 7b8967a..d20bd20 100644 --- a/src/hash.c +++ b/src/hash.c @@ -74,7 +74,7 @@ int inithashtable(struct hashtable *ht, unsigned tablesize, unsigned poolsize, u pthread_mutex_lock(&ht->hash_mutex); } if(!(ht->ihashtable = myalloc(tablesize * sizeof(uint32_t))) - || !(ht->hashvalues = myalloc(poolsize * (sizeof(struct hashentry) + (ht->recsize-4)))) + || !(ht->hashvalues = myalloc(poolsize * (sizeof(struct hashentry) + ht->recsize - 4))) || !(ht->hashhashvalues = myalloc(poolsize * ht->hash_size)) ){ myfree(ht->ihashtable);