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
7272256a
Commit
7272256a
authored
Oct 12, 2012
by
Christian Costa
Committed by
Alexandre Julliard
Oct 12, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
amstream: Check filename pointer in IAMMultiMediaStreamImpl_OpenFile.
parent
9bdf9817
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
3 deletions
+10
-3
amstream.c
dlls/amstream/amstream.c
+6
-3
amstream.c
dlls/amstream/tests/amstream.c
+4
-0
No files found.
dlls/amstream/amstream.c
View file @
7272256a
...
...
@@ -397,7 +397,7 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_AddMediaStream(IAMMultiMediaStream
return
hr
;
}
static
HRESULT
WINAPI
IAMMultiMediaStreamImpl_OpenFile
(
IAMMultiMediaStream
*
iface
,
LPCWSTR
pszFileName
,
DWORD
dwF
lags
)
static
HRESULT
WINAPI
IAMMultiMediaStreamImpl_OpenFile
(
IAMMultiMediaStream
*
iface
,
LPCWSTR
filename
,
DWORD
f
lags
)
{
IAMMultiMediaStreamImpl
*
This
=
impl_from_IAMMultiMediaStream
(
iface
);
HRESULT
ret
=
S_OK
;
...
...
@@ -407,14 +407,17 @@ static HRESULT WINAPI IAMMultiMediaStreamImpl_OpenFile(IAMMultiMediaStream* ifac
PIN_DIRECTION
pin_direction
;
const
WCHAR
sourceW
[]
=
{
'S'
,
'o'
,
'u'
,
'r'
,
'c'
,
'e'
,
0
};
TRACE
(
"(%p/%p)->(%s,%x)
\n
"
,
This
,
iface
,
debugstr_w
(
pszFileName
),
dwFlags
);
TRACE
(
"(%p/%p)->(%s,%x)
\n
"
,
This
,
iface
,
debugstr_w
(
filename
),
flags
);
if
(
!
filename
)
return
E_POINTER
;
/* If Initialize was not called before, we do it here */
if
(
!
This
->
pFilterGraph
)
ret
=
IAMMultiMediaStream_Initialize
(
iface
,
STREAMTYPE_READ
,
0
,
NULL
);
if
(
SUCCEEDED
(
ret
))
ret
=
IGraphBuilder_AddSourceFilter
(
This
->
pFilterGraph
,
pszFileN
ame
,
sourceW
,
&
BaseFilter
);
ret
=
IGraphBuilder_AddSourceFilter
(
This
->
pFilterGraph
,
filen
ame
,
sourceW
,
&
BaseFilter
);
if
(
SUCCEEDED
(
ret
))
ret
=
IBaseFilter_EnumPins
(
BaseFilter
,
&
EnumPins
);
...
...
dlls/amstream/tests/amstream.c
View file @
7272256a
...
...
@@ -412,6 +412,10 @@ static void test_media_streams(void)
}
}
/* Test open file with no filename */
hr
=
IAMMultiMediaStream_OpenFile
(
pams
,
NULL
,
0
);
ok
(
hr
==
E_POINTER
,
"IAMMultiMediaStream_OpenFile returned %x instead of %x
\n
"
,
hr
,
E_POINTER
);
if
(
video_stream
)
IMediaStream_Release
(
video_stream
);
if
(
audio_stream
)
...
...
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