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

vitor subversion
Wed Jul 18 08:45:47 CEST 2007


Author: vitor
Date: Wed Jul 18 08:45:47 2007
New Revision: 9730

Log:
Test for supported number of channels

Modified:
   trunk/libavcodec/alac.c

Modified: trunk/libavcodec/alac.c
==============================================================================
--- trunk/libavcodec/alac.c	(original)
+++ trunk/libavcodec/alac.c	Wed Jul 18 08:45:47 2007
@@ -491,6 +491,11 @@ static int alac_decode_frame(AVCodecCont
     init_get_bits(&alac->gb, inbuffer, input_buffer_size * 8);
 
     channels = get_bits(&alac->gb, 3) + 1;
+    if (channels > MAX_CHANNELS) {
+        av_log(avctx, AV_LOG_ERROR, "channels > %d not supported\n",
+               MAX_CHANNELS);
+        return input_buffer_size;
+    }
 
     /* 2^result = something to do with output waiting.
      * perhaps matters if we read > 1 frame in a pass?




More information about the ffmpeg-cvslog mailing list