Commit 1327ae0c authored by Vladimir Pankratov's avatar Vladimir Pankratov Committed by Alexandre Julliard

urlmon: Handle NULL parameter.

parent d24a5a74
...@@ -1326,6 +1326,14 @@ static void test_MkParseDisplayNameEx(void) ...@@ -1326,6 +1326,14 @@ static void test_MkParseDisplayNameEx(void)
IBindCtx_Release(bctx); IBindCtx_Release(bctx);
} }
static void test_IsValidURL(void)
{
HRESULT hr;
hr = IsValidURL(NULL, 0, 0);
ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
}
START_TEST(misc) START_TEST(misc)
{ {
OleInitialize(NULL); OleInitialize(NULL);
...@@ -1345,6 +1353,7 @@ START_TEST(misc) ...@@ -1345,6 +1353,7 @@ START_TEST(misc)
test_UrlMkGetSessionOption(); test_UrlMkGetSessionOption();
test_user_agent(); test_user_agent();
test_MkParseDisplayNameEx(); test_MkParseDisplayNameEx();
test_IsValidURL();
OleUninitialize(); OleUninitialize();
} }
...@@ -393,10 +393,10 @@ HRESULT WINAPI DllRegisterServerEx(void) ...@@ -393,10 +393,10 @@ HRESULT WINAPI DllRegisterServerEx(void)
HRESULT WINAPI IsValidURL(LPBC pBC, LPCWSTR szURL, DWORD dwReserved) HRESULT WINAPI IsValidURL(LPBC pBC, LPCWSTR szURL, DWORD dwReserved)
{ {
FIXME("(%p, %s, %d): stub\n", pBC, debugstr_w(szURL), dwReserved); FIXME("(%p, %s, %d): stub\n", pBC, debugstr_w(szURL), dwReserved);
if (pBC != NULL || dwReserved != 0) if (pBC || dwReserved || !szURL)
return E_INVALIDARG; return E_INVALIDARG;
return S_OK; return S_OK;
} }
......
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