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: v7.86~49 X-Git-Url: https://code.citadel.org/?p=citadel.git;a=commitdiff_plain;h=e11c8828d4e4f52e4a832b79a37ea6fce629e469 * 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;