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
8dd0a2c5
Commit
8dd0a2c5
authored
Nov 11, 2014
by
Vittorio Giovara
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
libopusenc: prevent an out-of-bounds read by returning early
CC: libav-stable@libav.org Bug-Id: CID 1244188
parent
b09cf8af
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
libopusenc.c
libavcodec/libopusenc.c
+4
-3
No files found.
libavcodec/libopusenc.c
View file @
8dd0a2c5
...
@@ -163,10 +163,11 @@ static int av_cold libopus_encode_init(AVCodecContext *avctx)
...
@@ -163,10 +163,11 @@ static int av_cold libopus_encode_init(AVCodecContext *avctx)
/* FIXME: Opus can handle up to 255 channels. However, the mapping for
/* FIXME: Opus can handle up to 255 channels. However, the mapping for
* anything greater than 8 is undefined. */
* anything greater than 8 is undefined. */
if
(
avctx
->
channels
>
8
)
if
(
avctx
->
channels
>
8
)
{
av_log
(
avctx
,
AV_LOG_
WARNING
,
av_log
(
avctx
,
AV_LOG_
ERROR
,
"Channel layout undefined for %d channels.
\n
"
,
avctx
->
channels
);
"Channel layout undefined for %d channels.
\n
"
,
avctx
->
channels
);
return
AVERROR_PATCHWELCOME
;
}
if
(
!
avctx
->
bit_rate
)
{
if
(
!
avctx
->
bit_rate
)
{
/* Sane default copied from opusenc */
/* Sane default copied from opusenc */
avctx
->
bit_rate
=
64000
*
opus
->
stream_count
+
avctx
->
bit_rate
=
64000
*
opus
->
stream_count
+
...
...
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