[FFmpeg-cvslog] r13052 - trunk/libavcodec/alac.c

michael subversion
Sat May 3 23:06:56 CEST 2008


Author: michael
Date: Sat May  3 23:06:55 2008
New Revision: 13052

Log:
Output buffer overflow.


Modified:
   trunk/libavcodec/alac.c

Modified: trunk/libavcodec/alac.c
==============================================================================
--- trunk/libavcodec/alac.c	(original)
+++ trunk/libavcodec/alac.c	Sat May  3 23:06:55 2008
@@ -465,6 +465,11 @@ static int alac_decode_frame(AVCodecCont
     } else
         outputsamples = alac->setinfo_max_samples_per_frame;
 
+    if(outputsamples > *outputsize / alac->bytespersample){
+        av_log(avctx, AV_LOG_ERROR, "sample buffer too small\n");
+        return -1;
+    }
+
     *outputsize = outputsamples * alac->bytespersample;
     readsamplesize = alac->setinfo_sample_size - (wasted_bytes * 8) + channels - 1;
 




More information about the ffmpeg-cvslog mailing list