mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
Do not decode more data than output buffer may hold
Originally committed as revision 10547 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
ee9d77dde6
commit
675a0583b4
@ -317,6 +317,8 @@ static int cinaudio_decode_frame(AVCodecContext *avctx,
|
||||
uint8_t *src = buf;
|
||||
int16_t *samples = (int16_t *)data;
|
||||
|
||||
buf_size = FFMIN(buf_size, *data_size/2);
|
||||
|
||||
if (cin->initial_decode_frame) {
|
||||
cin->initial_decode_frame = 0;
|
||||
cin->delta = (int16_t)AV_RL16(src); src += 2;
|
||||
|
Loading…
Reference in New Issue
Block a user