From 5ad9ede05c008b3e22a723958cb8373dfdb70c44 Mon Sep 17 00:00:00 2001 From: Pierre Schweitzer Date: Tue, 3 May 2016 17:58:28 +0000 Subject: [PATCH 1/1] [KERNEL32] 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/reactos/dll/win32/kernel32/client/file/find.c b/reactos/dll/win32/kernel32/client/file/find.c index ccd13854cd5..4a2d1520e66 100644 --- a/reactos/dll/win32/kernel32/client/file/find.c +++ b/reactos/dll/win32/kernel32/client/file/find.c @@ -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 */ -- 2.17.1