diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2019-03-17 11:14:26 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2019-03-25 15:32:55 +0100 |
commit | 530286c96bd83b333833cd36b71a35268cb435f9 (patch) | |
tree | bb17f53f683547912b957525366b3b9978b06c55 /libavformat | |
parent | d34202f4f036eb68f5b131138c167e79b5d97aa2 (diff) | |
download | ffmpeg-530286c96bd83b333833cd36b71a35268cb435f9.tar.gz |
avformat/mov: Fix potential integer overflow in entry check in mov_read_trun()
No testcase
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit ff13a92a6f8413402f5b3cacedda7c10d350b487)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-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 14a02dc4e6..7a34a228c1 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -4760,7 +4760,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"); } |