Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
0831be5a
Commit
0831be5a
authored
Mar 06, 2008
by
Lei Zhang
Committed by
Alexandre Julliard
Mar 06, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Validate input for FilterGraph2_AddFilter.
parent
66067423
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
+31
-0
filtergraph.c
dlls/quartz/filtergraph.c
+3
-0
filtergraph.c
dlls/quartz/tests/filtergraph.c
+28
-0
No files found.
dlls/quartz/filtergraph.c
View file @
0831be5a
...
...
@@ -347,6 +347,9 @@ static HRESULT WINAPI FilterGraph2_AddFilter(IFilterGraph2 *iface,
TRACE
(
"(%p/%p)->(%p, %s (%p))
\n
"
,
This
,
iface
,
pFilter
,
debugstr_w
(
pName
),
pName
);
if
(
!
pFilter
)
return
E_POINTER
;
wszFilterName
=
CoTaskMemAlloc
(
(
pName
?
strlenW
(
pName
)
+
6
:
5
)
*
sizeof
(
WCHAR
)
);
if
(
pName
)
...
...
dlls/quartz/tests/filtergraph.c
View file @
0831be5a
...
...
@@ -148,6 +148,33 @@ static void test_graph_builder(void)
releasefiltergraph
();
}
static
void
test_graph_builder_addfilter
(
void
)
{
HRESULT
hr
;
IBaseFilter
*
pF
=
NULL
;
static
const
WCHAR
testFilterW
[]
=
{
't'
,
'e'
,
's'
,
't'
,
'F'
,
'i'
,
'l'
,
't'
,
'e'
,
'r'
,
0
};
if
(
!
createfiltergraph
())
return
;
hr
=
IGraphBuilder_AddFilter
(
pgraph
,
NULL
,
testFilterW
);
ok
(
hr
==
E_POINTER
,
"IGraphBuilder_AddFilter returned: %x
\n
"
,
hr
);
/* create video filter */
hr
=
CoCreateInstance
(
&
CLSID_VideoRenderer
,
NULL
,
CLSCTX_INPROC_SERVER
,
&
IID_IBaseFilter
,
(
LPVOID
*
)
&
pF
);
ok
(
hr
==
S_OK
,
"CoCreateInstance failed with %x
\n
"
,
hr
);
ok
(
pF
!=
NULL
,
"pF is NULL
\n
"
);
if
(
!
pF
)
{
skip
(
"failed to created filter, skipping
\n
"
);
return
;
}
hr
=
IGraphBuilder_AddFilter
(
pgraph
,
pF
,
NULL
);
ok
(
hr
==
S_OK
,
"IGraphBuilder_AddFilter returned: %x
\n
"
,
hr
);
releasefiltergraph
();
}
static
void
test_filter_graph2
(
void
)
{
HRESULT
hr
;
...
...
@@ -167,5 +194,6 @@ START_TEST(filtergraph)
CoInitialize
(
NULL
);
test_render_run
();
test_graph_builder
();
test_graph_builder_addfilter
();
test_filter_graph2
();
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment