Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
fc85646a
Commit
fc85646a
authored
Nov 24, 2016
by
Andreas Cadhalpun
Committed by
Vittorio Giovara
Dec 08, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libopusdec: fix out-of-bounds read
Signed-off-by:
Andreas Cadhalpun
<
Andreas.Cadhalpun@googlemail.com
>
parent
dc2ad094
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
0 deletions
+7
-0
libopusdec.c
libavcodec/libopusdec.c
+7
-0
No files found.
libavcodec/libopusdec.c
View file @
fc85646a
...
...
@@ -48,6 +48,13 @@ static av_cold int libopus_decode_init(AVCodecContext *avc)
avc
->
channels
=
2
;
}
avc
->
channels
=
avc
->
extradata_size
>=
10
?
avc
->
extradata
[
9
]
:
(
avc
->
channels
==
1
)
?
1
:
2
;
if
(
avc
->
channels
<=
0
)
{
av_log
(
avc
,
AV_LOG_WARNING
,
"Invalid number of channels %d, defaulting to stereo
\n
"
,
avc
->
channels
);
avc
->
channels
=
2
;
}
avc
->
sample_rate
=
48000
;
avc
->
sample_fmt
=
avc
->
request_sample_fmt
==
AV_SAMPLE_FMT_FLT
?
AV_SAMPLE_FMT_FLT
:
AV_SAMPLE_FMT_S16
;
...
...
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