[FFmpeg-cvslog] r13495 - trunk/libavcodec/adpcm.c
michael
subversion
Wed May 28 13:59:41 CEST 2008
Author: michael
Date: Wed May 28 13:59:41 2008
New Revision: 13495
Log:
Prevent 128*1<<trellis from becoming 0 and creating 0 sized arrays.
fixes CID84 RUN2
Modified:
trunk/libavcodec/adpcm.c
Modified: trunk/libavcodec/adpcm.c
==============================================================================
--- trunk/libavcodec/adpcm.c (original)
+++ trunk/libavcodec/adpcm.c Wed May 28 13:59:41 2008
@@ -158,6 +158,12 @@ static int adpcm_encode_init(AVCodecCont
{
if (avctx->channels > 2)
return -1; /* only stereo or mono =) */
+
+ if(avctx->trellis && (unsigned)avctx->trellis > 16U){
+ av_log(avctx, AV_LOG_ERROR, "invalid trellis size\n");
+ return -1;
+ }
+
switch(avctx->codec->id) {
case CODEC_ID_ADPCM_IMA_WAV:
avctx->frame_size = (BLKSIZE - 4 * avctx->channels) * 8 / (4 * avctx->channels) + 1; /* each 16 bits sample gives one nibble */
More information about the ffmpeg-cvslog
mailing list