[FFmpeg-cvslog] r22711 - trunk/libavcodec/tta.c

jai_menon subversion
Sun Mar 28 19:17:48 CEST 2010


Author: jai_menon
Date: Sun Mar 28 19:17:48 2010
New Revision: 22711

Log:
TTA : Check if the output buffer size is within bounds.

Modified:
   trunk/libavcodec/tta.c

Modified: trunk/libavcodec/tta.c
==============================================================================
--- trunk/libavcodec/tta.c	Sun Mar 28 15:39:36 2010	(r22710)
+++ trunk/libavcodec/tta.c	Sun Mar 28 19:17:48 2010	(r22711)
@@ -302,6 +302,10 @@ static int tta_decode_frame(AVCodecConte
         int cur_chan = 0, framelen = s->frame_length;
         int32_t *p;
 
+        if (*data_size < (framelen * s->channels * 2)) {
+            av_log(avctx, AV_LOG_ERROR,"Output buffer size is too small.\n");
+            return -1;
+        }
         // FIXME: seeking
         s->total_frames--;
         if (!s->total_frames && s->last_frame_length)



More information about the ffmpeg-cvslog mailing list