You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
Check that the buffer size speified to avcodec_encode_audio() is not larger than the actual size.
Originally committed as revision 20767 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
5
ffmpeg.c
5
ffmpeg.c
@@ -728,6 +728,11 @@ static void do_audio_out(AVFormatContext *s,
|
||||
if (coded_bps)
|
||||
size_out = size_out*coded_bps/8;
|
||||
|
||||
if(size_out > audio_out_size){
|
||||
fprintf(stderr, "Internal error, buffer size too small\n");
|
||||
av_exit(1);
|
||||
}
|
||||
|
||||
//FIXME pass ost->sync_opts as AVFrame.pts in avcodec_encode_audio()
|
||||
ret = avcodec_encode_audio(enc, audio_out, size_out,
|
||||
(short *)buftmp);
|
||||
|
Reference in New Issue
Block a user