diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2021-04-19 14:30:17 +0300 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2021-10-06 14:54:16 +0300 |
commit | 6dcff59432f66579b12384c73a2e60b425b289bb (patch) | |
tree | fd0b1fcf55f5e9e725eafb6176233713a2615cc5 /libavformat/mov.c | |
parent | 16629cf4a6a70ce1727a26f1c31f9a294c85013d (diff) |
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>
Diffstat (limited to 'libavformat/mov.c')
-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 b566f8babb..21896f22d2 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -4635,6 +4635,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; } |