From d47def82770af4b7c74a0843d4a93863768692ff Mon Sep 17 00:00:00 2001 From: =?utf8?q?Wilfried=20G=C3=B6esgens?= Date: Sat, 20 Dec 2008 23:50:08 +0000 Subject: [PATCH] * handle negative index condition --- libcitadel/lib/hash.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcitadel/lib/hash.c b/libcitadel/lib/hash.c index b3c75795b..b8ba8c346 100644 --- a/libcitadel/lib/hash.c +++ b/libcitadel/lib/hash.c @@ -619,7 +619,7 @@ int GetNextHashPos(HashList *Hash, HashPos *At, long *HKLen, const char **HashKe { long PayloadPos; - if ((Hash == NULL) || (At->Position >= Hash->nMembersUsed)) + if ((Hash == NULL) || (At->Position >= Hash->nMembersUsed) || (At->Position < 0)) return 0; *HKLen = Hash->LookupTable[At->Position]->HKLen; *HashKey = Hash->LookupTable[At->Position]->HashKey; -- 2.30.2