[FFmpeg-cvslog] avformat/mov: Use av_sat_add64() in mov_read_sidx()
Michael Niedermayer
git at videolan.org
Sat Dec 5 01:11:36 EET 2020
ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Oct 31 12:06:21 2020 +0100| [c34004d82f43309f9ea2120edd94f68ec667e796] | committer: Michael Niedermayer
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 at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c34004d82f43309f9ea2120edd94f68ec667e796
---
libavformat/mov.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index ed34130034..2193e06ab7 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -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;
More information about the ffmpeg-cvslog
mailing list