diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-03-28 01:08:24 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-03-28 01:08:46 +0100 |
commit | 1831274ff1ef69d4b730993e03283430775e2eca (patch) | |
tree | 3fa02045c8b0de386baf356643b629c13f4a2afd /libavformat/electronicarts.c | |
parent | a56d963f111b1a192cdabb05500f8083bd77ca93 (diff) | |
download | ffmpeg-1831274ff1ef69d4b730993e03283430775e2eca.tar.gz |
electronicarts: check timebase, fix assertion failure
Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavformat/electronicarts.c')
-rw-r--r-- | libavformat/electronicarts.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/electronicarts.c b/libavformat/electronicarts.c index cf7a271263..dae40b1dd9 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; |