[dll] fixing drive enumeration
setacl tool was calling into our dll to enumerate mounted drives. the index was not updated after we returned the results and caused an infinite loop.
This commit is contained in:
parent
bb8de9c266
commit
faec978ad5
1 changed files with 3 additions and 6 deletions
|
|
@ -780,7 +780,8 @@ NPEnumResource(
|
|||
if ( Status == WN_SUCCESS)
|
||||
{
|
||||
Status = WN_NO_MORE_ENTRIES;
|
||||
for (Index = *(PULONG)hEnum; Index < pSharedMemory->NextAvailableIndex; Index++)
|
||||
for (Index = *(PULONG)hEnum; EntriesCopied < *lpcCount &&
|
||||
Index < pSharedMemory->NextAvailableIndex; Index++)
|
||||
{
|
||||
pNfsNetResource = &pSharedMemory->NetResources[Index];
|
||||
|
||||
|
|
@ -834,13 +835,9 @@ NPEnumResource(
|
|||
StringCbCopyW( StringZone, sizeof(NFS41_PROVIDER_NAME_U), NFS41_PROVIDER_NAME_U );
|
||||
StringZone += sizeof(NFS41_PROVIDER_NAME_U)/sizeof(WCHAR);
|
||||
EntriesCopied++;
|
||||
if(EntriesCopied >= *lpcCount)
|
||||
{
|
||||
Status = WN_SUCCESS;
|
||||
break;
|
||||
}
|
||||
// set new bottom of string zone
|
||||
StringZone = (PWCHAR)( (PBYTE) StringZone - SpaceNeeded );
|
||||
Status = WN_SUCCESS;
|
||||
}
|
||||
pNetResource++;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue