diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2005-02-13 23:36:04 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2005-02-13 23:36:04 +0000 |
commit | a8d02f2bc90e8d963f1a95f7a75de520259bb2d2 (patch) | |
tree | 122c71c27cd0012141790ae03bb65541f4ef5846 /libavcodec/pcm.c | |
parent | 7be806f31b5c07b33d774a3d96f4ae41ff7b7693 (diff) | |
download | ffmpeg-a8d02f2bc90e8d963f1a95f7a75de520259bb2d2.tar.gz |
buffer overflow
Originally committed as revision 3954 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/pcm.c')
-rw-r--r-- | libavcodec/pcm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c index 13a16e7475..8e57d11a1c 100644 --- a/libavcodec/pcm.c +++ b/libavcodec/pcm.c @@ -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; |