https://git.reactos.org/?p=reactos.git;a=commitdiff;h=16fcf694efc4115d5d3549...
commit 16fcf694efc4115d5d354919cf861a81848139f2 Author: Pierre Schweitzer pierre@reactos.org AuthorDate: Mon Oct 21 12:58:30 2019 +0200 Commit: Pierre Schweitzer pierre@reactos.org CommitDate: Mon Oct 21 12:58:30 2019 +0200
[MOUNTMGR] Fix setting up reparse index file name
This fixes memory smashing while attempting to volume reparse index (we were previously trying to copy the name on itself, in the middle of itself...). This code won't go farther on FAT, it requires NTFS.
Now, with this, ReactOS can properly boot with MountMgr handling DOS devices without any crash or code disabled. Cf: what was written in 7608ac9.
Modifications in class2, disk, and ntoskrnl are still to be committed to enable all this. --- drivers/filters/mountmgr/database.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/filters/mountmgr/database.c b/drivers/filters/mountmgr/database.c index 5e94f5c9a50..a025f7db3ec 100644 --- a/drivers/filters/mountmgr/database.c +++ b/drivers/filters/mountmgr/database.c @@ -678,11 +678,10 @@ ReconcileThisDatabaseWithMasterWorker(IN PVOID Parameter) goto ReleaseRDS; }
- RtlCopyMemory(ReparseFile.Buffer, DeviceInformation->DeviceName.Buffer, DeviceInformation->DeviceName.Length); RtlCopyMemory((PVOID)((ULONG_PTR)ReparseFile.Buffer + DeviceInformation->DeviceName.Length), - ReparseFile.Buffer, ReparseFile.Length); + ReparseIndex.Buffer, ReparseIndex.Length); ReparseFile.Buffer[ReparseFile.Length / sizeof(WCHAR)] = UNICODE_NULL;
InitializeObjectAttributes(&ObjectAttributes,