diff options
author | Keiji Costantini <strites@gmail.com> | 2014-03-01 18:17:04 +0000 |
---|---|---|
committer | Reinhard Tartler <siretart@tauware.de> | 2014-03-02 11:45:32 -0500 |
commit | aa2a3ca27a3269e2b975686652204607fad8bc49 (patch) | |
tree | e5f6c1dda88727fad03b427da807f2edd3aba44d /libavcodec | |
parent | b4d72f901c96f526dc1090a77bf84cec4d2e000d (diff) | |
download | ffmpeg-aa2a3ca27a3269e2b975686652204607fad8bc49.tar.gz |
ituh263: reject b-frame with pp_time = 0
Avoid a division by 0 in ff_mpeg4_set_one_direct_mv.
Sample-Id: 00000168-google
Reported-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: Vittorio Giovara <vittorio.giovara@gmail.com>
(cherry picked from commit 9514440337875e0c63b409abcd616b68c518283f)
(cherry picked from commit 5df52b0131d3d4d804ad6e221bc9a2cd8b201ef2)
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/ituh263dec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/ituh263dec.c b/libavcodec/ituh263dec.c index cb26be21df..3cbc7b84d2 100644 --- a/libavcodec/ituh263dec.c +++ b/libavcodec/ituh263dec.c @@ -753,6 +753,8 @@ int ff_h263_decode_mb(MpegEncContext *s, } if(IS_DIRECT(mb_type)){ + if (!s->pp_time) + return AVERROR_INVALIDDATA; s->mv_dir = MV_DIR_FORWARD | MV_DIR_BACKWARD | MV_DIRECT; mb_type |= ff_mpeg4_set_direct_mv(s, 0, 0); }else{ |