aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNicolas Sugino <nsugino@3way.com.ar>2017-07-26 15:29:02 -0300
committerMichael Niedermayer <michael@niedermayer.cc>2017-08-09 22:08:18 +0200
commitdf884e038f5dc95f55ef07500b5b99b722835f8a (patch)
treec04df4b54b235e42b88ee1c80e09533ac8764dda
parent448c88e1a586adc350e5a07c18c0be6706101deb (diff)
downloadffmpeg-df884e038f5dc95f55ef07500b5b99b722835f8a.tar.gz
avcodec/aacdec: Fix PCE channel_layout verification
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavcodec/aacdec_template.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c
index 90cc143781..a539f74e6f 100644
--- a/libavcodec/aacdec_template.c
+++ b/libavcodec/aacdec_template.c
@@ -763,7 +763,7 @@ static int decode_pce(AVCodecContext *avctx, MPEG4AudioConfig *m4ac,
if (get_bits1(gb))
skip_bits(gb, 3); // mixdown_coeff_index and pseudo_surround
- if (get_bits_left(gb) < 4 * (num_front + num_side + num_back + num_lfe + num_assoc_data + num_cc)) {
+ if (get_bits_left(gb) < 5 * (num_front + num_side + num_back + num_cc) + 4 *(num_lfe + num_assoc_data + num_cc)) {
av_log(avctx, AV_LOG_ERROR, "decode_pce: " overread_err);
return -1;
}