diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2021-04-19 13:30:17 +0200 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-09-11 21:23:49 +0200 |
commit | 34880e35418b5fed42281adf1c8bb6e92ad2dce3 (patch) | |
tree | 6c4aea23f08924981f8caf946c889eb60eb7b628 | |
parent | 78f4185041523dced28fcee73f7934d76c442d61 (diff) | |
download | ffmpeg-34880e35418b5fed42281adf1c8bb6e92ad2dce3.tar.gz |
avformat/mov: Limit nb_chapter_tracks to input size
Fixes: Timeout (15k loop iterations instead of 400m)
Fixes: 31368/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6601583174483968
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 299a56c9006b2eb8807c3e3efefb91a78fe6b3b2)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r-- | libavformat/mov.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c index 827fb9fcb9..68959a583d 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -4304,6 +4304,8 @@ static int mov_read_chap(MOVContext *c, AVIOContext *pb, MOVAtom atom) for (i = 0; i < num && !pb->eof_reached; i++) c->chapter_tracks[i] = avio_rb32(pb); + c->nb_chapter_tracks = i; + return 0; } |