* off by one in range checking of indexed access
[citadel.git] / libcitadel / lib / hash.c
index 684dc466de08889b505ed8b7fa7f0dce82d6e486..bd22f10a8f35df74d5c1a58e68c7a1e379f7ff38 100644 (file)
@@ -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;