[IMM32] ImmEnumInputContext: Validate hIMC (#8761)

Tougher system.
JIRA issue: CORE-19268
Check hIMC and gpsi in
ImmEnumInputContext function.
This commit is contained in:
Katayama Hirofumi MZ
2026-03-23 22:43:33 +09:00
committed by GitHub
parent cad71d733f
commit e2ef2c9923

View File

@@ -1139,9 +1139,12 @@ ImmEnumInputContext(
for (dwIndex = 0; dwIndex < dwCount; ++dwIndex)
{
hIMC = phList[dwIndex];
ret = (*lpfn)(hIMC, lParam);
if (!ret)
break;
if (hIMC && gpsi && ValidateHandle(hIMC, TYPE_INPUTCONTEXT))
{
ret = (*lpfn)(hIMC, lParam);
if (!ret)
break;
}
}
ImmLocalFree(phList);