[USER32][IMM32] Use wcscspn instead of wcsspn
authorKatayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
Fri, 23 Sep 2022 04:50:24 +0000 (13:50 +0900)
committerKatayama Hirofumi MZ <katayama.hirofumi.mz@gmail.com>
Fri, 23 Sep 2022 04:50:24 +0000 (13:50 +0900)
b4575ec and db00a75 were my mistakes.
CORE-11700

dll/win32/imm32/utils.c
win32ss/user/user32/windows/input.c

index fc7461d..90fa7d6 100644 (file)
@@ -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);
index 57cb1e1..092a92e 100644 (file)
@@ -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;