aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2025-05-10 23:39:53 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2025-05-15 03:03:55 +0200
commit9fc2702f6f502064d0d2d75c97ece33f4b56eb84 (patch)
tree38c95a1d59da1901c37b20980347c5f363ec65a7
parent76e29bb8bfe7c5a29fead7a175aff3e3f505fd0a (diff)
downloadffmpeg-9fc2702f6f502064d0d2d75c97ece33f4b56eb84.tar.gz
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 <michael@niedermayer.cc>
-rw-r--r--libavformat/mov.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index cb81b6c4da..8a094b1ea0 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -6295,6 +6295,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;