[IMM32] Don't allow invalid 'IME File' values

Improve security. CORE-11700
This commit is contained in:
Katayama Hirofumi MZ
2022-09-16 17:38:48 +09:00
parent 87f2950e1a
commit db00a75227
+2 -1
View File
@@ -908,7 +908,8 @@ UINT APIENTRY Imm32GetImeLayout(PREG_IME pLayouts, UINT cLayouts)
RegCloseKey(hkeyIME);
if (!szImeFileName[0])
/* We don't allow the invalid "IME File" values for security reason */
if (!szImeFileName[0] || wcschr(szImeFileName, L'\\') != NULL)
break;
Imm32StrToUInt(szImeKey, &Value, 16);