[SCM] libav/experimental: Do not try to decode less than one frame of data in TrueSpeech decoder. This should solve issue 2085.

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 17:11:06 UTC 2013


The following commit has been merged in the experimental branch:
commit 231745781f16bbee6af0e11459087d9272cb0853
Author: Kostya Shishkov <kostya.shishkov at gmail.com>
Date:   Sun Jul 11 14:50:20 2010 +0000

    Do not try to decode less than one frame of data in TrueSpeech decoder.
    This should solve issue 2085.
    
    Originally committed as revision 24197 to svn://svn.ffmpeg.org/ffmpeg/trunk

diff --git a/libavcodec/truespeech.c b/libavcodec/truespeech.c
index 37fbef9..eafbca5 100644
--- a/libavcodec/truespeech.c
+++ b/libavcodec/truespeech.c
@@ -347,6 +347,11 @@ static int truespeech_decode_frame(AVCodecContext *avctx,
     if (!buf_size)
         return 0;
 
+    if (buf_size < 32) {
+        av_log(avctx, AV_LOG_ERROR,
+               "Too small input buffer (%d bytes), need at least 32 bytes\n", buf_size);
+        return -1;
+    }
     iterations = FFMIN(buf_size / 32, *data_size / 480);
     for(j = 0; j < iterations; j++) {
         truespeech_read_frame(c, buf + consumed);

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list