mirror of
git://source.winehq.org/git/wine.git
synced 2024-11-05 18:01:34 +00:00
msctf: Don't crash on NULL input in EnumLanguageProfiles().
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de> Signed-off-by: Aric Stewart <aric@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
a711285137
commit
fd0101ab61
2 changed files with 9 additions and 0 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue