diff options
author | antirez <antirez@gmail.com> | 2012-01-21 23:05:32 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2012-01-21 23:30:13 +0100 |
commit | a48c8d873bc2a49f66ab398ebed51dc45764ca17 (patch) | |
tree | 07daaa600da630f75e35583806d098bfd0228758 /src/dict.h | |
parent | 447ebf3bc73016a6137a458bf0314109a0128157 (diff) | |
download | redis-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.h | 2 |
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; |