1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-11-21 10:55:51 +02:00

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>
This commit is contained in:
Michael Niedermayer 2021-04-19 13:30:17 +02:00
parent 537d402d56
commit 299a56c900

View File

@ -4656,6 +4656,8 @@ static int mov_read_chap(MOVContext *c, AVIOContext *pb, MOVAtom atom)
for (i = 0; i < num && !pb->eof_reached; i++) for (i = 0; i < num && !pb->eof_reached; i++)
c->chapter_tracks[i] = avio_rb32(pb); c->chapter_tracks[i] = avio_rb32(pb);
c->nb_chapter_tracks = i;
return 0; return 0;
} }