From 7a3bf4aa6e5941ae6a115b085d6fc50bfe45a9cc Mon Sep 17 00:00:00 2001 From: Wilfried Goesgens Date: Thu, 23 Sep 2010 18:19:28 +0200 Subject: [PATCH] * off by one in range checking of indexed access --- 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 684dc466d..bd22f10a8 100644 --- a/libcitadel/lib/hash.c +++ b/libcitadel/lib/hash.c @@ -811,7 +811,7 @@ int GetHashAt(HashList *Hash,long At, long *HKLen, const char **HashKey, void ** if ((Hash == NULL) || (At < 0) || - (At > Hash->nLookupTableItems)) + (At >= Hash->nLookupTableItems)) return 0; *HKLen = Hash->LookupTable[At]->HKLen; *HashKey = Hash->LookupTable[At]->HashKey; -- 2.30.2