https://git.reactos.org/?p=reactos.git;a=commitdiff;h=56f6734fa5eb03f9355a62261240997659bd5c63
commit 56f6734fa5eb03f9355a62261240997659bd5c63 Author: Adam Słaboń <asail...@protonmail.com> AuthorDate: Sun Mar 3 00:04:43 2024 +0100 Commit: Hermès BÉLUSCA - MAÏTO <hermes.belusca-ma...@reactos.org> CommitDate: Mon Oct 7 11:16:03 2024 +0200 [KERNEL32] GetVolumeNameForRoot: Use towupper for uppercasing the drive letter Drive letter is a wide character, using the non-Unicode aware toupper could corrupt it. --- 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 362ed15be82..8fab74c9a8d 100644 --- a/dll/win32/kernel32/client/file/mntpoint.c +++ b/dll/win32/kernel32/client/file/mntpoint.c @@ -61,7 +61,7 @@ GetVolumeNameForRoot(IN LPCWSTR lpszRootPath, { if (NtPathName.Buffer[(NtPathName.Length / sizeof(WCHAR)) - 1] == L':') { - NtPathName.Buffer[(NtPathName.Length / sizeof(WCHAR)) - 2] = _toupper(NtPathName.Buffer[(NtPathName.Length / sizeof(WCHAR)) - 2]); + NtPathName.Buffer[(NtPathName.Length / sizeof(WCHAR)) - 2] = towupper(NtPathName.Buffer[(NtPathName.Length / sizeof(WCHAR)) - 2]); } }