Commit a0881b36 authored by michael's avatar michael

Check that the buffer size speified to avcodec_encode_audio() is not larger than the actual size.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@20767 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 604bcd38
...@@ -728,6 +728,11 @@ static void do_audio_out(AVFormatContext *s, ...@@ -728,6 +728,11 @@ static void do_audio_out(AVFormatContext *s,
if (coded_bps) if (coded_bps)
size_out = size_out*coded_bps/8; 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() //FIXME pass ost->sync_opts as AVFrame.pts in avcodec_encode_audio()
ret = avcodec_encode_audio(enc, audio_out, size_out, ret = avcodec_encode_audio(enc, audio_out, size_out,
(short *)buftmp); (short *)buftmp);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment