mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
return error if buf_size is too small
Originally committed as revision 12981 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
dfcd6d91fe
commit
a82dcdffb2
@ -2570,11 +2570,10 @@ static int decode_frame_mp3on4(AVCodecContext * avctx,
|
||||
|
||||
len = buf_size;
|
||||
|
||||
*data_size = 0;
|
||||
// Discard too short frames
|
||||
if (buf_size < HEADER_SIZE) {
|
||||
*data_size = 0;
|
||||
return buf_size;
|
||||
}
|
||||
if (buf_size < HEADER_SIZE)
|
||||
return -1;
|
||||
|
||||
// If only one decoder interleave is not needed
|
||||
outptr = s->frames == 1 ? out_samples : decoded_buf;
|
||||
|
Loading…
Reference in New Issue
Block a user