Message ID | CAOYzH=KbmAh60jAusjKohxUN1XmNgMoQ=nAocLLt=Qg4PDT3WA@mail.gmail.com |
---|---|
State | New |
Headers | show |
On Mon, Apr 22, 2019 at 11:05:00AM -0700, Dan Sanders wrote: > It's this or add overflow detection in mov_read_header(). > --- > libavformat/mov.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) will apply thanks [...]
diff --git a/libavformat/mov.c b/libavformat/mov.c index d5ce077e63..247a65ed11 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -2940,7 +2940,7 @@ static int mov_read_stts(MOVContext *c, AVIOContext *pb, MOVAtom atom) if (duration > 0 && duration <= INT64_MAX - sc->duration_for_fps && - total_sample_count <= INT64_MAX - sc->nb_frames_for_fps + total_sample_count <= INT_MAX - sc->nb_frames_for_fps ) { sc->duration_for_fps += duration;