X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=libcitadel%2Flib%2Fhash.c;h=b8ba8c346839ac267ebcad69e39a835e8bfea0f6;hb=d47def82770af4b7c74a0843d4a93863768692ff;hp=b3c75795bd1438ac130240a054cc9df5e885b055;hpb=8d1f422aa65bb9f488306f97bc5814bc37d4521a;p=citadel.git 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;