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
bb95f8c2
Commit
bb95f8c2
authored
Sep 18, 2023
by
Paul Gofman
Committed by
Alexandre Julliard
Sep 27, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
winegstreamer: Validate maximum channel count in _SetInputType in AAC decoder.
parent
902133b0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
transform.c
dlls/mf/tests/transform.c
+1
-1
aac_decoder.c
dlls/winegstreamer/aac_decoder.c
+5
-0
No files found.
dlls/mf/tests/transform.c
View file @
bb95f8c2
...
...
@@ -2586,7 +2586,7 @@ static void test_aac_decoder_channels(const struct attribute_desc *input_type_de
ok
(
hr
==
S_OK
,
"got %#lx.
\n
"
,
hr
);
else
{
todo_wine
ok
(
hr
==
MF_E_INVALIDMEDIATYPE
,
"got %#lx.
\n
"
,
hr
);
ok
(
hr
==
MF_E_INVALIDMEDIATYPE
,
"got %#lx.
\n
"
,
hr
);
winetest_pop_context
();
continue
;
}
...
...
dlls/winegstreamer/aac_decoder.c
View file @
bb95f8c2
...
...
@@ -374,6 +374,7 @@ static HRESULT WINAPI transform_SetInputType(IMFTransform *iface, DWORD id, IMFM
{
struct
aac_decoder
*
decoder
=
impl_from_IMFTransform
(
iface
);
MF_ATTRIBUTE_TYPE
item_type
;
UINT32
channel_count
;
GUID
major
,
subtype
;
HRESULT
hr
;
ULONG
i
;
...
...
@@ -396,6 +397,10 @@ static HRESULT WINAPI transform_SetInputType(IMFTransform *iface, DWORD id, IMFM
if
(
i
==
ARRAY_SIZE
(
aac_decoder_input_types
))
return
MF_E_INVALIDMEDIATYPE
;
if
(
SUCCEEDED
(
IMFMediaType_GetUINT32
(
type
,
&
MF_MT_AUDIO_NUM_CHANNELS
,
&
channel_count
))
&&
channel_count
>=
ARRAY_SIZE
(
default_channel_mask
))
return
MF_E_INVALIDMEDIATYPE
;
if
(
FAILED
(
IMFMediaType_GetItemType
(
type
,
&
MF_MT_AUDIO_SAMPLES_PER_SECOND
,
&
item_type
))
||
item_type
!=
MF_ATTRIBUTE_UINT32
)
return
MF_E_INVALIDMEDIATYPE
;
...
...
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