https://git.reactos.org/?p=reactos.git;a=commitdiff;h=eb502bbc103f239b3d122…
commit eb502bbc103f239b3d12230d7819f9a886a5ff71
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Mon Aug 8 15:44:03 2022 +0200
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Thu Dec 1 20:17:40 2022 +0200
[KERNEL32] Fix a bug in GetVolumeNameForRoot
---
dll/win32/kernel32/client/file/mntpoint.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dll/win32/kernel32/client/file/mntpoint.c
b/dll/win32/kernel32/client/file/mntpoint.c
index badb519112f..362ed15be82 100644
--- a/dll/win32/kernel32/client/file/mntpoint.c
+++ b/dll/win32/kernel32/client/file/mntpoint.c
@@ -206,7 +206,7 @@ GetVolumeNameForRoot(IN LPCWSTR lpszRootPath,
/* Make a string of it, to easy the checks */
SymbolicLink.Length =
MountPoints->MountPoints[CurrentMntPt].SymbolicLinkNameLength;
SymbolicLink.MaximumLength = SymbolicLink.Length;
- SymbolicLink.Buffer =
(PVOID)((ULONG_PTR)&MountPoints->MountPoints[CurrentMntPt] +
MountPoints->MountPoints[CurrentMntPt].SymbolicLinkNameOffset);
+ SymbolicLink.Buffer = (PVOID)((ULONG_PTR)MountPoints +
MountPoints->MountPoints[CurrentMntPt].SymbolicLinkNameOffset);
/* If that's a NT volume name (GUID form), keep it! */
if (MOUNTMGR_IS_NT_VOLUME_NAME(&SymbolicLink))
{