urlmon: Handle NULL parameter.

This commit is contained in:
Vladimir Pankratov 2009-09-02 16:12:03 +05:00 committed by Alexandre Julliard
parent d24a5a74b1
commit 1327ae0c74
2 changed files with 12 additions and 3 deletions

View File

@ -1326,6 +1326,14 @@ static void test_MkParseDisplayNameEx(void)
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)
{
OleInitialize(NULL);
@ -1345,6 +1353,7 @@ START_TEST(misc)
test_UrlMkGetSessionOption();
test_user_agent();
test_MkParseDisplayNameEx();
test_IsValidURL();
OleUninitialize();
}

View File

@ -394,7 +394,7 @@ HRESULT WINAPI IsValidURL(LPBC pBC, LPCWSTR szURL, DWORD 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 S_OK;