From 5af5117d9aa5765da193a4966ac6108708f6edfe Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Sun, 9 Mar 2008 22:03:20 +0000 Subject: [PATCH] * don't search for null-lengthened strings. --- libcitadel/lib/hash.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libcitadel/lib/hash.c b/libcitadel/lib/hash.c index 50c3e8d7a..4443552b9 100644 --- a/libcitadel/lib/hash.c +++ b/libcitadel/lib/hash.c @@ -378,6 +378,10 @@ int GetHash(HashList *Hash, const char *HKey, long HKLen, void **Data) long HashBinKey; long HashAt; + if (HKLen <= 0) { + *Data = NULL; + return 0; + } /** first, find out were we could be... */ HashBinKey = CalcHashKey((char*)HKey, HKLen); HashAt = FindInHash(Hash, HashBinKey); -- 2.30.2