Commit 4531c0dc authored by Michael Niedermayer's avatar Michael Niedermayer

avformat/mov: Fix integer overflow in FFABS

Fixes: unknown_unknown_19e_414_cov_764838672_bellhamlam.mov

Found-by: Mateusz "j00ru" Jurczyk and Gynvael Coldwind
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 053e80f6)
Signed-off-by: 's avatarMichael Niedermayer <michael@niedermayer.cc>
parent 8ebeefec
...@@ -2177,7 +2177,7 @@ static int mov_read_ctts(MOVContext *c, AVIOContext *pb, MOVAtom atom) ...@@ -2177,7 +2177,7 @@ static int mov_read_ctts(MOVContext *c, AVIOContext *pb, MOVAtom atom)
av_dlog(c->fc, "count=%d, duration=%d\n", av_dlog(c->fc, "count=%d, duration=%d\n",
count, duration); count, duration);
if (FFABS(duration) > (1<<28) && i+2<entries) { if (FFNABS(duration) < -(1<<28) && i+2<entries) {
av_log(c->fc, AV_LOG_WARNING, "CTTS invalid\n"); av_log(c->fc, AV_LOG_WARNING, "CTTS invalid\n");
av_freep(&sc->ctts_data); av_freep(&sc->ctts_data);
sc->ctts_count = 0; sc->ctts_count = 0;
......
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