summaryrefslogtreecommitdiff
path: root/src/dict.h
diff options
context:
space:
mode:
authorantirez <antirez@gmail.com>2012-01-21 23:05:32 +0100
committerantirez <antirez@gmail.com>2012-01-21 23:30:13 +0100
commita48c8d873bc2a49f66ab398ebed51dc45764ca17 (patch)
tree07daaa600da630f75e35583806d098bfd0228758 /src/dict.h
parent447ebf3bc73016a6137a458bf0314109a0128157 (diff)
downloadredis-a48c8d873bc2a49f66ab398ebed51dc45764ca17.tar.gz
Fix for hash table collision attack. We simply randomize hash table initialization value at startup time.
Diffstat (limited to 'src/dict.h')
-rw-r--r--src/dict.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/dict.h b/src/dict.h
index 764510473..5f8569535 100644
--- a/src/dict.h
+++ b/src/dict.h
@@ -162,6 +162,8 @@ void dictEnableResize(void);
void dictDisableResize(void);
int dictRehash(dict *d, int n);
int dictRehashMilliseconds(dict *d, int ms);
+void dictSetHashFunctionSeed(unsigned int initval);
+unsigned int dictGetHashFunctionSeed(void);
/* Hash table types */
extern dictType dictTypeHeapStringCopyKey;