diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2024-03-25 03:13:50 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2024-07-02 21:57:18 +0200 |
commit | 2882d30e3acfc3155e2be11db653c7c721f94f34 (patch) | |
tree | 0cf99cf8a436bb25c9beb3949de005806f6ea780 /libavformat/mov.c | |
parent | 09a62a641390d496098eb1e6d61f47ea2e0debf3 (diff) | |
download | ffmpeg-2882d30e3acfc3155e2be11db653c7c721f94f34.tar.gz |
avformat/mov: Check edit list for overflow
Fixes: 67492/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5778297231310848
Fixes: signed integer overflow: 2314885530818453536 + 7782220156096217088 cannot be represented in type 'long'
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat/mov.c')
-rw-r--r-- | libavformat/mov.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 14f43bf906..7b1f90c890 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -3686,6 +3686,10 @@ static int get_edit_list_entry(MOVContext *mov, } *edit_list_duration = av_rescale(*edit_list_duration, msc->time_scale, global_timescale); + + if (*edit_list_duration + (uint64_t)*edit_list_media_time > INT64_MAX) + *edit_list_duration = 0; + return 1; } |