From: Wilfried Goesgens Date: Thu, 23 Sep 2010 16:19:28 +0000 (+0200) Subject: * off by one in range checking of indexed access X-Git-Tag: v8.01~704 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=7a3bf4aa6e5941ae6a115b085d6fc50bfe45a9cc * off by one in range checking of indexed access --- 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;