1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

Output buffer overflow.

Originally committed as revision 13052 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2008-05-03 21:06:55 +00:00
parent 494e353179
commit f7739f3708

View File

@ -465,6 +465,11 @@ static int alac_decode_frame(AVCodecContext *avctx,
} 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;