[IMM32] Follow-up of db00a75

Add more invalid characters. CORE-11700
This commit is contained in:
Katayama Hirofumi MZ 2022-09-16 17:54:15 +09:00
parent 8a48446d11
commit 787bbf0693

View 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] || wcschr(szImeFileName, L'\\') != NULL)
if (!szImeFileName[0] || wcsspn(szImeFileName, L":\\/") != wcslen(szImeFileName))
break;
Imm32StrToUInt(szImeKey, &Value, 16);