Commit fd0101ab authored by Michael Stefaniuc's avatar Michael Stefaniuc Committed by Alexandre Julliard

msctf: Don't crash on NULL input in EnumLanguageProfiles().

parent a7112851
......@@ -617,6 +617,10 @@ static HRESULT WINAPI InputProcessorProfiles_EnumLanguageProfiles(
{
InputProcessorProfiles *This = impl_from_ITfInputProcessorProfiles(iface);
TRACE("(%p) %x %p\n",This,langid,ppEnum);
if (!ppEnum)
return E_INVALIDARG;
return EnumTfLanguageProfiles_Constructor(langid, ppEnum);
}
......
......@@ -973,6 +973,11 @@ static void test_EnumLanguageProfiles(void)
{
BOOL found = FALSE;
IEnumTfLanguageProfiles *ppEnum;
HRESULT hr;
hr = ITfInputProcessorProfiles_EnumLanguageProfiles(g_ipp, gLangid, NULL);
ok(hr == E_INVALIDARG, "EnumLanguageProfiles failed: %x\n", hr);
if (SUCCEEDED(ITfInputProcessorProfiles_EnumLanguageProfiles(g_ipp,gLangid,&ppEnum)))
{
TF_LANGUAGEPROFILE profile;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment