ffmpeg | branch: release/4.4 | Michael Niedermayer <mich...@niedermayer.cc> | 
Sat May 10 23:39:53 2025 +0200| [04b03f7cf388c8b46e0e1c605329eed7e8375fad] | 
committer: Michael Niedermayer

avformat/mov: reject negative ELST durations

Fixes: multiple integer overflows
Fixes: 
401016767/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6242067591790592

Found-by: continuous fuzzing process 
https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>
(cherry picked from commit 9fc2702f6f502064d0d2d75c97ece33f4b56eb84)
Signed-off-by: Michael Niedermayer <mich...@niedermayer.cc>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=04b03f7cf388c8b46e0e1c605329eed7e8375fad
---

 libavformat/mov.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/libavformat/mov.c b/libavformat/mov.c
index 06eacca4e9..b03a8f8295 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -5366,6 +5366,11 @@ static int mov_read_elst(MOVContext *c, AVIOContext *pb, 
MOVAtom atom)
                    c->fc->nb_streams-1, i, e->time);
             return AVERROR_INVALIDDATA;
         }
+        if (e->duration < 0) {
+            av_log(c->fc, AV_LOG_ERROR, "Track %d, edit %d: Invalid edit list 
duration=%"PRId64"\n",
+                   c->fc->nb_streams-1, i, e->duration);
+            return AVERROR_INVALIDDATA;
+        }
     }
     sc->elst_count = i;
 

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

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

Reply via email to