Fixes: signed integer overflow: -9223372036854775808 - 2082844800 cannot be 
represented in type 'long'
Fixes: 
58384/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6428383700713472

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>
---
 libavformat/mov.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 9fdeef057e..3e2c4bc10d 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -1530,6 +1530,10 @@ static void mov_metadata_creation_time(MOVContext *c, 
AVIOContext *pb, AVDiction
         }
     }
     if (time) {
+        if (time < INT64_MIN + 2082844800) {
+            av_log(c->fc, AV_LOG_DEBUG, "creation_time predates big bang\n");
+            return;
+        }
         time -= 2082844800;  /* seconds between 1904-01-01 and Epoch */
 
         if ((int64_t)(time * 1000000ULL) / 1000000 != time) {
-- 
2.17.1

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".

Reply via email to