Browse Source

buffer overflow

Originally committed as revision 3954 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Michael Niedermayer 20 years ago
parent
commit
a8d02f2bc9
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavcodec/pcm.c

+ 3
- 0
libavcodec/pcm.c 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;


Loading…
Cancel
Save