1
mirror of https://git.videolan.org/git/ffmpeg.git synced 2024-09-29 16:23:10 +02:00

buffer overflow

Originally committed as revision 3954 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
Michael Niedermayer 2005-02-13 23:36:04 +00:00
parent 7be806f31b
commit a8d02f2bc9

View File

@ -299,6 +299,9 @@ static int pcm_decode_frame(AVCodecContext *avctx,
samples = data;
src = buf;
if(buf_size > AVCODEC_MAX_AUDIO_FRAME_SIZE/2)
buf_size = AVCODEC_MAX_AUDIO_FRAME_SIZE/2;
switch(avctx->codec->id) {
case CODEC_ID_PCM_S16LE:
n = buf_size >> 1;