git.videolan.org
/
ffmpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fcf3e06
)
avcodec/opus: Check count of ambisonic channels
author
Michael Niedermayer
<michael@niedermayer.cc>
Fri, 17 Feb 2017 10:18:30 +0000
(11:18 +0100)
committer
Michael Niedermayer
<michael@niedermayer.cc>
Fri, 17 Feb 2017 10:18:30 +0000
(11:18 +0100)
https://tools.ietf.org/html/draft-ietf-codec-ambisonics-01#section-3.1
specifies the maximum as 227
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
libavcodec/opus.c
patch
|
blob
|
history
diff --git
a/libavcodec/opus.c
b/libavcodec/opus.c
index
07e70fd
..
5847e88
100644
(file)
--- a/
libavcodec/opus.c
+++ b/
libavcodec/opus.c
@@
-381,6
+381,10
@@
av_cold int ff_opus_parse_extradata(AVCodecContext *avctx,
" for nonnegative integer n\n");
return AVERROR_INVALIDDATA;
}
+ if (channels > 227) {
+ av_log(avctx, AV_LOG_ERROR, "Too many channels\n");
+ return AVERROR_INVALIDDATA;
+ }
layout = 0;
} else
layout = 0;