[FFmpeg-cvslog] r19986 - trunk/libavcodec/mpegaudiodec.c

michael subversion
Wed Sep 23 13:29:39 CEST 2009


Author: michael
Date: Wed Sep 23 13:29:38 2009
New Revision: 19986

Log:
check data_size in decode_frame()

Modified:
   trunk/libavcodec/mpegaudiodec.c

Modified: trunk/libavcodec/mpegaudiodec.c
==============================================================================
--- trunk/libavcodec/mpegaudiodec.c	Wed Sep 23 12:48:58 2009	(r19985)
+++ trunk/libavcodec/mpegaudiodec.c	Wed Sep 23 13:29:38 2009	(r19986)
@@ -2276,6 +2276,9 @@ static int decode_frame(AVCodecContext *
     avctx->bit_rate = s->bit_rate;
     avctx->sub_id = s->layer;
 
+    if(*data_size < 1152*avctx->channels*sizeof(OUT_INT))
+        return -1;
+
     if(s->frame_size<=0 || s->frame_size > buf_size){
         av_log(avctx, AV_LOG_ERROR, "incomplete frame\n");
         return -1;



More information about the ffmpeg-cvslog mailing list