[FFmpeg-devel] [PATCH] avcodec/aacdec: Fix PCE channel_layout	verification
    nsugino at 3way.com.ar 
    nsugino at 3way.com.ar
       
    Wed Jul 26 21:29:02 EEST 2017
    
    
  
From: Nicolas Sugino <nsugino at 3way.com.ar>
---
 libavcodec/aacdec_template.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c
index 90cc143..a539f74 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;
     }
-- 
2.1.4
    
    
More information about the ffmpeg-devel
mailing list