The onliner:
- Move to next entry by applying the offset to the previous entry, and not to the first entry
This fixes enumerating ADS from files with 3+ streams. Previously, doing dir /R in a directory would have lead to a cmd crash.
CORE-11164 #resolve #comment Fixed by r71245
svn path=/trunk/; revision=71245
/* Select next stream if possible */
if (FindStreamData->CurrentInfo->NextEntryOffset != 0)
{
- FindStreamData->CurrentInfo = (PFILE_STREAM_INFORMATION)((ULONG_PTR)FindStreamData->FileStreamInfo +
+ FindStreamData->CurrentInfo = (PFILE_STREAM_INFORMATION)((ULONG_PTR)FindStreamData->CurrentInfo +
FindStreamData->CurrentInfo->NextEntryOffset);
/* Return the information */