[FFmpeg-cvslog] electronicarts: check timebase, fix assertion failure

Michael Niedermayer git at videolan.org
Thu Mar 28 02:11:41 CET 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Thu Mar 28 01:08:24 2013 +0100| [1831274ff1ef69d4b730993e03283430775e2eca] | committer: Michael Niedermayer

electronicarts: check timebase, fix assertion failure

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavformat/electronicarts.c |    4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c
index cf7a271..dae40b1 100644
--- a/libavformat/electronicarts.c
+++ b/libavformat/electronicarts.c
@@ -289,6 +289,10 @@ static int process_video_header_vp6(AVFormatContext *s)
     avio_skip(pb, 4);
     ea->time_base.den = avio_rl32(pb);
     ea->time_base.num = avio_rl32(pb);
+    if (ea->time_base.den <= 0 || ea->time_base.num <= 0) {
+        av_log(s, AV_LOG_ERROR, "Timebase is invalid\n");
+        return AVERROR_INVALIDDATA;
+    }
     ea->video_codec = AV_CODEC_ID_VP6;
 
     return 1;



More information about the ffmpeg-cvslog mailing list