ffmpeg | branch: release/2.4 | Anton Khirnov <an...@khirnov.net> | Fri Nov 14 
20:20:50 2014 +0100| [12700b0219521a5f20c8ba47b3ad7857ea9e0554] | committer: 
Anton Khirnov

mp3enc: fix a triggerable assert

We have to check against the number of bytes actually needed, not the
theoretical maximum size.

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=12700b0219521a5f20c8ba47b3ad7857ea9e0554
---

 libavformat/mp3enc.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavformat/mp3enc.c b/libavformat/mp3enc.c
index 476d7f7..1eaa585 100644
--- a/libavformat/mp3enc.c
+++ b/libavformat/mp3enc.c
@@ -196,7 +196,7 @@ static void mp3_write_xing(AVFormatContext *s)
 
     avpriv_mpegaudio_decode_header(&mpah, header);
 
-    av_assert0(mpah.frame_size >= XING_MAX_SIZE);
+    av_assert0(mpah.frame_size >= bytes_needed);
 
     ffio_fill(s->pb, 0, xing_offset);
     mp3->xing_offset = avio_tell(s->pb);

_______________________________________________
ffmpeg-cvslog mailing list
ffmpeg-cvslog@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog

Reply via email to