mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-19 05:49:09 +02:00
avformat/mov: Check dts for overflow in mov_read_trun()
Fixes: signed integer overflow: 9223372034248226491 + 3275247799 cannot be represented in type 'long' Fixes: clusterfuzz-testcase-minimized-audio_decoder_fuzzer-4538729166077952 Reported-by: Matt Wolenetz <wolenetz@google.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
06ce821bc7
commit
4de4bc06fd
@ -4953,6 +4953,8 @@ static int mov_read_trun(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
||||
"size %u, distance %d, keyframe %d\n", st->index,
|
||||
index_entry_pos, offset, dts, sample_size, distance, keyframe);
|
||||
distance++;
|
||||
if (av_sat_add64(dts, sample_duration) != dts + (uint64_t)sample_duration)
|
||||
return AVERROR_INVALIDDATA;
|
||||
dts += sample_duration;
|
||||
offset += sample_size;
|
||||
sc->data_size += sample_size;
|
||||
|
Loading…
x
Reference in New Issue
Block a user