[FFmpeg-cvslog] avformat/mov: Check edit list for overflow
Michael Niedermayer
git at videolan.org
Wed Jul 24 17:48:51 EEST 2024
ffmpeg | branch: release/4.3 | Michael Niedermayer <michael at niedermayer.cc> | Mon Mar 25 03:13:50 2024 +0100| [c803c8ef60695da1a2b8ecc62b0bc645bf66a704] | committer: Michael Niedermayer
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 at niedermayer.cc>
(cherry picked from commit 2882d30e3acfc3155e2be11db653c7c721f94f34)
Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c803c8ef60695da1a2b8ecc62b0bc645bf66a704
---
libavformat/mov.c | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/libavformat/mov.c b/libavformat/mov.c
index 775ce649bf..d10e312827 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -3187,6 +3187,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;
}
More information about the ffmpeg-cvslog
mailing list