[SCM] libav/experimental: Only check frame size if the header is valid.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 16:58:35 UTC 2013


The following commit has been merged in the experimental branch:
commit 008f872f614e6646c5b1fc8888e40bea4796eb5f
Author: Justin Ruggles <justin.ruggles at gmail.com>
Date:   Sun Jan 24 23:55:33 2010 +0000

    Only check frame size if the header is valid.
    
    Originally committed as revision 21439 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/ac3dec.c b/libavcodec/ac3dec.c
index ba7ae16..8b78a0a 100644
--- a/libavcodec/ac3dec.c
+++ b/libavcodec/ac3dec.c
@@ -1237,7 +1237,7 @@ static int ac3_decode_frame(AVCodecContext * avctx, void *data, int *data_size,
     err = parse_frame_header(s);
 
     /* check that reported frame size fits in input buffer */
-    if(s->frame_size > buf_size) {
+    if(!err && s->frame_size > buf_size) {
         av_log(avctx, AV_LOG_ERROR, "incomplete frame\n");
         err = AAC_AC3_PARSE_ERROR_FRAME_SIZE;
     }

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list