diff options
author | James Almer <jamrial@gmail.com> | 2024-06-30 23:40:20 -0300 |
---|---|---|
committer | James Almer <jamrial@gmail.com> | 2024-07-03 19:54:31 -0300 |
commit | a9a5d000aa14fc1caa535de4649a67e5a209435d (patch) | |
tree | e53e4e48b847cf401dc6388b41a0a2514d850624 /libavformat/mov.c | |
parent | c49898a6b15a11a953620c588422c004cb826d15 (diff) | |
download | ffmpeg-a9a5d000aa14fc1caa535de4649a67e5a209435d.tar.gz |
avformat/mov: check extent_offset calculation for overflow
Signed-off-by: James Almer <jamrial@gmail.com>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r-- | libavformat/mov.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index d31fb23f27..e8b7420fc7 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -8456,7 +8456,8 @@ static int mov_read_iloc(MOVContext *c, AVIOContext *pb, MOVAtom atom) } for (int j = 0; j < extent_count; j++) { if (rb_size(pb, &extent_offset, offset_size) < 0 || - rb_size(pb, &extent_length, length_size) < 0) + rb_size(pb, &extent_length, length_size) < 0 || + base_offset > INT64_MAX - extent_offset) return AVERROR_INVALIDDATA; if (offset_type == 1) c->heif_item[i].is_idat_relative = 1; |