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 299a56c900)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
29052446dc
commit
75b816f2c4
1 changed files with 2 additions and 0 deletions
|
|
@ -4097,6 +4097,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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue