diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-03-17 13:14:26 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-03-25 15:20:30 +0300 |
commit | ff13a92a6f8413402f5b3cacedda7c10d350b487 (patch) | |
tree | 0446098d4f78148d75acc7e37513d519518dd5c1 /libavformat/mov.c | |
parent | d92034a06aadd057b3d3b08a1bd3cb8b1aab0898 (diff) |
avformat/mov: Fix potential integer overflow in entry check in mov_read_trun()
No testcase
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r-- | libavformat/mov.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 9e5670c61a..d5ce077e63 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -4778,7 +4778,7 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom) av_log(c->fc, AV_LOG_TRACE, "first sample flags 0x%x\n", first_sample_flags); // realloc space for new index entries - if((unsigned)st->nb_index_entries + entries >= UINT_MAX / sizeof(AVIndexEntry)) { + if((uint64_t)st->nb_index_entries + entries >= UINT_MAX / sizeof(AVIndexEntry)) { entries = UINT_MAX / sizeof(AVIndexEntry) - st->nb_index_entries; av_log(c->fc, AV_LOG_ERROR, "Failed to add index entry\n"); } |