mirror of
https://git.openafs.org/openafs.git
synced 2025-02-01 05:57:43 +00:00
windows-btree-enum-20080723
LICENSE MIT Fix next enum to return an invalid param error when beyond the end of the list.
This commit is contained in:
parent
2ed0ee573c
commit
a9c00f2638
@ -2336,11 +2336,11 @@ cm_BPlusDirEnumBulkStat(cm_scache_t *dscp, cm_direnum_t *enump, cm_user_t *userp
|
||||
long
|
||||
cm_BPlusDirNextEnumEntry(cm_direnum_t *enump, cm_direnum_entry_t **entrypp)
|
||||
{
|
||||
if (enump == NULL || entrypp == NULL || enump->next > enump->count) {
|
||||
if (enump == NULL || entrypp == NULL || enump->next >= enump->count) {
|
||||
if (entrypp)
|
||||
*entrypp = NULL;
|
||||
osi_Log0(afsd_logp, "cm_BPlusDirNextEnumEntry invalid input");
|
||||
return CM_ERROR_INVAL; \
|
||||
return CM_ERROR_INVAL;
|
||||
}
|
||||
|
||||
*entrypp = &enump->entry[enump->next++];
|
||||
|
Loading…
x
Reference in New Issue
Block a user