https://git.reactos.org/?p=reactos.git;a=commitdiff;h=f79e80c520a2e39baf024a5d81450eebde73b1bd
commit f79e80c520a2e39baf024a5d81450eebde73b1bd Author: Katayama Hirofumi MZ <katayama.hirofumi...@gmail.com> AuthorDate: Fri Sep 23 13:50:24 2022 +0900 Commit: Katayama Hirofumi MZ <katayama.hirofumi...@gmail.com> CommitDate: Fri Sep 23 13:50:24 2022 +0900 [USER32][IMM32] Use wcscspn instead of wcsspn b4575ec and db00a75 were my mistakes. CORE-11700 --- dll/win32/imm32/utils.c | 2 +- win32ss/user/user32/windows/input.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dll/win32/imm32/utils.c b/dll/win32/imm32/utils.c index fc7461d61ad..90fa7d6c1d1 100644 --- a/dll/win32/imm32/utils.c +++ b/dll/win32/imm32/utils.c @@ -909,7 +909,7 @@ UINT APIENTRY Imm32GetImeLayout(PREG_IME pLayouts, UINT cLayouts) RegCloseKey(hkeyIME); /* We don't allow the invalid "IME File" values for security reason */ - if (!szImeFileName[0] || wcsspn(szImeFileName, L":\\/") != wcslen(szImeFileName)) + if (!szImeFileName[0] || wcscspn(szImeFileName, L":\\/") != wcslen(szImeFileName)) break; Imm32StrToUInt(szImeKey, &Value, 16); diff --git a/win32ss/user/user32/windows/input.c b/win32ss/user/user32/windows/input.c index 57cb1e18b7a..092a92efefc 100644 --- a/win32ss/user/user32/windows/input.c +++ b/win32ss/user/user32/windows/input.c @@ -805,7 +805,7 @@ IntLoadKeyboardLayout( /* We don't allow the invalid "IME File" values for security reason */ if (dwType != REG_SZ || szImeFileName[0] == 0 || - wcsspn(szImeFileName, L":\\/") != wcslen(szImeFileName) || + wcscspn(szImeFileName, L":\\/") != wcslen(szImeFileName) || GetFileAttributesW(szPath) == INVALID_FILE_ATTRIBUTES) /* Does not exist? */ { bIsIME = FALSE;