Commit 68e1735a authored by Detlef Riekenberg's avatar Detlef Riekenberg Committed by Alexandre Julliard

mlang: Check output pointer for NULL.

parent 596f8d67
......@@ -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)
......
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