[USER32] Avoid szImeFileName buffer overrun

CORE-11700
This commit is contained in:
Katayama Hirofumi MZ 2022-09-16 18:04:55 +09:00
parent b4575eccd7
commit 75116d6b87

View file

@ -800,6 +800,7 @@ IntLoadKeyboardLayout(
else
{
WCHAR szPath[MAX_PATH];
szImeFileName[_countof(szImeFileName) - 1] = UNICODE_NULL;
GetSystemLibraryPath(szPath, _countof(szPath), szImeFileName);
/* We don't allow the invalid "IME File" values for security reason */