Browse Source

avformat/mov: Use av_sat_add64() in mov_read_sidx()

This avoids a potential integer overflow, no testcase is known

Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
tags/n4.4
Michael Niedermayer 5 years ago
parent
commit
c34004d82f
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      libavformat/mov.c

+ 1
- 1
libavformat/mov.c View File

@@ -5052,7 +5052,7 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom)
static int mov_read_sidx(MOVContext *c, AVIOContext *pb, MOVAtom atom)
{
int64_t stream_size = avio_size(pb);
int64_t offset = avio_tell(pb) + atom.size, pts, timestamp;
int64_t offset = av_sat_add64(avio_tell(pb), atom.size), pts, timestamp;
uint8_t version, is_complete;
unsigned i, j, track_id, item_count;
AVStream *st = NULL;


Loading…
Cancel
Save