quartz: Validate input for IFilterGraph_FindFilterByName.
This commit is contained in:
parent
31aab42934
commit
2d1a6016c9
@ -483,7 +483,8 @@ static HRESULT WINAPI GraphBuilder_FindFilterByName(IGraphBuilder *iface,
|
|||||||
|
|
||||||
TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_w(pName), pName, ppFilter);
|
TRACE("(%p/%p)->(%s (%p), %p)\n", This, iface, debugstr_w(pName), pName, ppFilter);
|
||||||
|
|
||||||
*ppFilter = NULL;
|
if (!ppFilter)
|
||||||
|
return E_POINTER;
|
||||||
|
|
||||||
for (i = 0; i < This->nFilters; i++)
|
for (i = 0; i < This->nFilters; i++)
|
||||||
{
|
{
|
||||||
@ -495,6 +496,7 @@ static HRESULT WINAPI GraphBuilder_FindFilterByName(IGraphBuilder *iface,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
*ppFilter = NULL;
|
||||||
return VFW_E_NOT_FOUND;
|
return VFW_E_NOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -143,6 +143,8 @@ static void test_graph_builder(void)
|
|||||||
hr = IGraphBuilder_FindFilterByName(pgraph, testFilterW, &pF2);
|
hr = IGraphBuilder_FindFilterByName(pgraph, testFilterW, &pF2);
|
||||||
ok(hr == S_OK, "IGraphBuilder_FindFilterByName returned %x\n", hr);
|
ok(hr == S_OK, "IGraphBuilder_FindFilterByName returned %x\n", hr);
|
||||||
ok(pF2 != NULL, "IGraphBuilder_FindFilterByName returned NULL\n");
|
ok(pF2 != NULL, "IGraphBuilder_FindFilterByName returned NULL\n");
|
||||||
|
hr = IGraphBuilder_FindFilterByName(pgraph, testFilterW, NULL);
|
||||||
|
ok(hr == E_POINTER, "IGraphBuilder_FindFilterByName returned %x\n", hr);
|
||||||
releasefiltergraph();
|
releasefiltergraph();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user