https://git.reactos.org/?p=reactos.git;a=commitdiff;h=787bbf0693bd6659741cd…
commit 787bbf0693bd6659741cd50098f2716b0ead5438
Author: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
AuthorDate: Fri Sep 16 17:54:15 2022 +0900
Commit: Katayama Hirofumi MZ <katayama.hirofumi.mz(a)gmail.com>
CommitDate: Fri Sep 16 17:54:15 2022 +0900
[IMM32] Follow-up of db00a75
Add more invalid characters. CORE-11700
---
dll/win32/imm32/utils.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dll/win32/imm32/utils.c b/dll/win32/imm32/utils.c
index 1ba6d556f21..fc7461d61ad 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] || wcschr(szImeFileName, L'\\') != NULL)
+ if (!szImeFileName[0] || wcsspn(szImeFileName, L":\\/") !=
wcslen(szImeFileName))
break;
Imm32StrToUInt(szImeKey, &Value, 16);