mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2024-12-30 03:12:08 +00:00
buffer overflow
Originally committed as revision 3954 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
7be806f31b
commit
a8d02f2bc9
@ -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…
Reference in New Issue
Block a user