qcap/capturegraph: Return E_POINTER when ICaptureGraphBuilder2::FindInterface() is called with NULL filter.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46950 Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.com> Signed-off-by: Zebediah Figura <z.figura12@gmail.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
7287bd5007
commit
4aabbaaf95
|
@ -343,6 +343,9 @@ static HRESULT WINAPI fnCaptureGraphBuilder2_FindInterface(ICaptureGraphBuilder2
|
|||
TRACE("graph %p, category %s, majortype %s, filter %p, iid %s, out %p.\n",
|
||||
graph, debugstr_guid(category), debugstr_guid(majortype), filter, debugstr_guid(iid), out);
|
||||
|
||||
if (!filter)
|
||||
return E_POINTER;
|
||||
|
||||
if (category && IsEqualGUID(category, &LOOK_DOWNSTREAM_ONLY))
|
||||
return find_interface_recurse(PINDIR_OUTPUT, NULL, NULL, filter, iid, out);
|
||||
|
||||
|
|
|
@ -384,6 +384,10 @@ static void test_find_interface(void)
|
|||
|
||||
/* Test search order without any restrictions applied. */
|
||||
|
||||
hr = ICaptureGraphBuilder2_FindInterface(capture_graph, NULL, &bogus_majortype,
|
||||
NULL, &testiid, (void **)&unk);
|
||||
ok(hr == E_POINTER, "got hr %#x.\n", hr);
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(tests_from_filter2); ++i)
|
||||
{
|
||||
hr = ICaptureGraphBuilder2_FindInterface(capture_graph, NULL, &bogus_majortype,
|
||||
|
|
Loading…
Reference in New Issue