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
a4d0d4fe
Commit
a4d0d4fe
authored
May 12, 2008
by
Lei Zhang
Committed by
Alexandre Julliard
May 13, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz: Check input in MediaControl_GetState.
parent
7ae4f695
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
17 additions
and
0 deletions
+17
-0
filtergraph.c
dlls/quartz/filtergraph.c
+3
-0
filtergraph.c
dlls/quartz/tests/filtergraph.c
+14
-0
No files found.
dlls/quartz/filtergraph.c
View file @
a4d0d4fe
...
...
@@ -1701,6 +1701,9 @@ static HRESULT WINAPI MediaControl_GetState(IMediaControl *iface,
TRACE
(
"(%p/%p)->(%d, %p): semi-stub !!!
\n
"
,
This
,
iface
,
msTimeout
,
pfs
);
if
(
!
pfs
)
return
E_POINTER
;
EnterCriticalSection
(
&
This
->
cs
);
*
pfs
=
This
->
state
;
...
...
dlls/quartz/tests/filtergraph.c
View file @
a4d0d4fe
...
...
@@ -232,6 +232,7 @@ static void test_mediacontrol(void)
LONGLONG
pos
=
0xdeadbeef
;
IMediaSeeking
*
seeking
=
NULL
;
IMediaFilter
*
filter
=
NULL
;
IMediaControl
*
control
=
NULL
;
IFilterGraph2_SetDefaultSyncSource
(
pgraph
);
hr
=
IFilterGraph2_QueryInterface
(
pgraph
,
&
IID_IMediaSeeking
,
(
void
**
)
&
seeking
);
...
...
@@ -247,6 +248,15 @@ static void test_mediacontrol(void)
return
;
}
hr
=
IFilterGraph2_QueryInterface
(
pgraph
,
&
IID_IMediaControl
,
(
void
**
)
&
control
);
ok
(
hr
==
S_OK
,
"QueryInterface IMediaControl failed: %08x
\n
"
,
hr
);
if
(
FAILED
(
hr
))
{
IUnknown_Release
(
seeking
);
IUnknown_Release
(
filter
);
return
;
}
hr
=
IMediaSeeking_GetCurrentPosition
(
seeking
,
&
pos
);
ok
(
hr
==
S_OK
,
"GetCurrentPosition failed: %08x
\n
"
,
hr
);
ok
(
pos
==
0
,
"Position != 0 (%x%08x)
\n
"
,
(
DWORD
)(
pos
>>
32
),
(
DWORD
)
pos
);
...
...
@@ -257,6 +267,10 @@ static void test_mediacontrol(void)
ok
(
hr
==
S_OK
,
"GetCurrentPosition failed: %08x
\n
"
,
hr
);
ok
(
pos
==
0
,
"Position != 0 (%x%08x)
\n
"
,
(
DWORD
)(
pos
>>
32
),
(
DWORD
)
pos
);
hr
=
IMediaControl_GetState
(
control
,
1000
,
NULL
);
ok
(
hr
==
E_POINTER
,
"GetState expected %08x, got %08x
\n
"
,
E_POINTER
,
hr
);
IUnknown_Release
(
control
);
IUnknown_Release
(
seeking
);
IUnknown_Release
(
filter
);
releasefiltergraph
();
...
...
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