mlang: Check output pointer for NULL.
This commit is contained in:
parent
596f8d67a0
commit
68e1735acf
|
@ -2257,6 +2257,8 @@ static HRESULT WINAPI fnIMultiLanguage_GetRfc1766FromLcid(
|
|||
WCHAR buf[MAX_RFC1766_NAME];
|
||||
|
||||
TRACE("%p %04x %p\n", iface, lcid, pbstrRfc1766);
|
||||
if (!pbstrRfc1766)
|
||||
return E_INVALIDARG;
|
||||
|
||||
if (!lcid_to_rfc1766W( lcid, buf, MAX_RFC1766_NAME ))
|
||||
{
|
||||
|
@ -2812,6 +2814,8 @@ static HRESULT WINAPI fnIMultiLanguage2_GetRfc1766FromLcid(
|
|||
WCHAR buf[MAX_RFC1766_NAME];
|
||||
|
||||
TRACE("%p %04x %p\n", iface, lcid, pbstrRfc1766);
|
||||
if (!pbstrRfc1766)
|
||||
return E_INVALIDARG;
|
||||
|
||||
if (!lcid_to_rfc1766W( lcid, buf, MAX_RFC1766_NAME ))
|
||||
{
|
||||
|
|
|
@ -966,6 +966,9 @@ static void test_GetRfc1766FromLcid(IMultiLanguage2 *iML2)
|
|||
|
||||
SysFreeString(rfcstr);
|
||||
}
|
||||
|
||||
hr = IMultiLanguage2_GetRfc1766FromLcid(iML2, MAKELANGID(LANG_ENGLISH, SUBLANG_ENGLISH_US), NULL);
|
||||
ok(hr == E_INVALIDARG, "got 0x%x (expected E_INVALIDARG)\n", hr);
|
||||
}
|
||||
|
||||
static void test_IMultiLanguage2_ConvertStringFromUnicode(IMultiLanguage2 *iML2)
|
||||
|
|
Loading…
Reference in New Issue