Commit 781faa1b authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

urlmon: Fixed handling NULL URLName in GetDisplatName implementation.

parent a5b2075e
......@@ -2574,6 +2574,7 @@ static void test_BindToStorage_fail(void)
static void test_StdURLMoniker(void)
{
IMoniker *mon, *async_mon;
LPOLESTR display_name;
HRESULT hres;
hres = CoCreateInstance(&IID_IInternet, NULL, CLSCTX_INPROC_SERVER|CLSCTX_INPROC_HANDLER,
......@@ -2587,6 +2588,9 @@ static void test_StdURLMoniker(void)
ok(mon == async_mon, "mon != async_mon\n");
IMoniker_Release(async_mon);
hres = IMoniker_GetDisplayName(mon, NULL, NULL, &display_name);
ok(hres == E_OUTOFMEMORY, "GetDisplayName failed: %08x, expected E_OUTOFMEMORY\n", hres);
IMoniker_Release(mon);
}
......@@ -2641,7 +2645,7 @@ START_TEST(url)
CoInitialize(NULL);
trace("test StdURLMoniker...");
trace("test StdURLMoniker...\n");
test_StdURLMoniker();
trace("synchronous http test...\n");
......
......@@ -377,6 +377,9 @@ static HRESULT WINAPI URLMoniker_GetDisplayName(IMoniker *iface, IBindCtx *pbc,
if(!ppszDisplayName)
return E_INVALIDARG;
if(!This->URLName)
return E_OUTOFMEMORY;
/* FIXME: If this is a partial URL, try and get a URL moniker from SZ_URLCONTEXT in the bind context,
then look at pmkToLeft to try and complete the URL
*/
......
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