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
45d4aa9f
Commit
45d4aa9f
authored
Mar 12, 2024
by
Rémi Bernon
Committed by
Alexandre Julliard
Mar 21, 2024
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat/mediatype: Check format pointers and sizes in MFInitMediaTypeFromAMMediaType.
parent
9ee0720d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
mediatype.c
dlls/mfplat/mediatype.c
+7
-3
No files found.
dlls/mfplat/mediatype.c
View file @
45d4aa9f
...
...
@@ -4270,13 +4270,17 @@ HRESULT WINAPI MFInitMediaTypeFromAMMediaType(IMFMediaType *media_type, const AM
{
const
GUID
*
subtype
=
get_mf_subtype_for_am_subtype
(
&
am_type
->
subtype
);
if
(
IsEqualGUID
(
&
am_type
->
formattype
,
&
FORMAT_VideoInfo
))
if
(
am_type
->
cbFormat
&&
!
am_type
->
pbFormat
)
hr
=
E_INVALIDARG
;
else
if
(
IsEqualGUID
(
&
am_type
->
formattype
,
&
FORMAT_VideoInfo
)
&&
am_type
->
cbFormat
>=
sizeof
(
VIDEOINFOHEADER
))
hr
=
MFInitMediaTypeFromVideoInfoHeader
(
media_type
,
(
VIDEOINFOHEADER
*
)
am_type
->
pbFormat
,
am_type
->
cbFormat
,
subtype
);
else
if
(
IsEqualGUID
(
&
am_type
->
formattype
,
&
FORMAT_VideoInfo2
))
else
if
(
IsEqualGUID
(
&
am_type
->
formattype
,
&
FORMAT_VideoInfo2
)
&&
am_type
->
cbFormat
>=
sizeof
(
VIDEOINFOHEADER2
))
hr
=
MFInitMediaTypeFromVideoInfoHeader2
(
media_type
,
(
VIDEOINFOHEADER2
*
)
am_type
->
pbFormat
,
am_type
->
cbFormat
,
subtype
);
else
{
FIXME
(
"Unsupported format type %s
.
\n
"
,
debugstr_guid
(
&
am_type
->
formattype
)
);
FIXME
(
"Unsupported format type %s
/ size %ld.
\n
"
,
debugstr_guid
(
&
am_type
->
formattype
),
am_type
->
cbFormat
);
return
E_NOTIMPL
;
}
...
...
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