Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
adc4dd67
Commit
adc4dd67
authored
Oct 06, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Oct 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
evr/presenter: Validate passed handle on SetVideoWindow().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c01a9bae
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
presenter.c
dlls/evr/presenter.c
+3
-0
evr.c
dlls/evr/tests/evr.c
+6
-0
No files found.
dlls/evr/presenter.c
View file @
adc4dd67
...
...
@@ -603,6 +603,9 @@ static HRESULT WINAPI video_presenter_control_SetVideoWindow(IMFVideoDisplayCont
TRACE
(
"%p, %p.
\n
"
,
iface
,
window
);
if
(
!
IsWindow
(
window
))
return
E_INVALIDARG
;
EnterCriticalSection
(
&
presenter
->
cs
);
presenter
->
video_window
=
window
;
LeaveCriticalSection
(
&
presenter
->
cs
);
...
...
dlls/evr/tests/evr.c
View file @
adc4dd67
...
...
@@ -1073,6 +1073,12 @@ static void test_default_presenter(void)
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
hwnd2
==
NULL
,
"Unexpected window %p.
\n
"
,
hwnd2
);
hr
=
IMFVideoDisplayControl_SetVideoWindow
(
display_control
,
NULL
);
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFVideoDisplayControl_SetVideoWindow
(
display_control
,
(
HWND
)
0x1
);
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFVideoDisplayControl_SetVideoWindow
(
display_control
,
hwnd
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
...
...
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