buffer overflow

Originally committed as revision 3954 to svn://svn.ffmpeg.org/ffmpeg/trunk
pull/126/head
Michael Niedermayer 20 years ago
parent 7be806f31b
commit a8d02f2bc9
  1. 3
      libavcodec/pcm.c

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

Loading…
Cancel
Save