[KERNEL32]
authorPierre Schweitzer <pierre@reactos.org>
Tue, 3 May 2016 17:58:28 +0000 (17:58 +0000)
committerPierre Schweitzer <pierre@reactos.org>
Tue, 3 May 2016 17:58:28 +0000 (17:58 +0000)
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

reactos/dll/win32/kernel32/client/file/find.c

index ccd1385..4a2d152 100644 (file)
@@ -1129,7 +1129,7 @@ FindNextStreamW(IN HANDLE hFindStream,
     /* 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 */