https://git.reactos.org/?p=reactos.git;a=commitdiff;h=75116d6b8755a337138fba6facf86c6511b5b1db

commit 75116d6b8755a337138fba6facf86c6511b5b1db
Author:     Katayama Hirofumi MZ <katayama.hirofumi...@gmail.com>
AuthorDate: Fri Sep 16 18:04:55 2022 +0900
Commit:     Katayama Hirofumi MZ <katayama.hirofumi...@gmail.com>
CommitDate: Fri Sep 16 18:04:55 2022 +0900

    [USER32] Avoid szImeFileName buffer overrun
    
    CORE-11700
---
 win32ss/user/user32/windows/input.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/win32ss/user/user32/windows/input.c 
b/win32ss/user/user32/windows/input.c
index 39ad3ab951f..57cb1e18b7a 100644
--- a/win32ss/user/user32/windows/input.c
+++ b/win32ss/user/user32/windows/input.c
@@ -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 */

Reply via email to