mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
avformat/mov: Check element count in mov_metadata_hmmt()
Fixes: Timeout
Fixes: 30325/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6048395703746560
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 1d277b92fa
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
c4ae8618f4
commit
959d2eb7c2
@ -290,6 +290,8 @@ static int mov_metadata_hmmt(MOVContext *c, AVIOContext *pb, unsigned len)
|
||||
return 0;
|
||||
|
||||
n_hmmt = avio_rb32(pb);
|
||||
if (n_hmmt > len / 4)
|
||||
return AVERROR_INVALIDDATA;
|
||||
for (i = 0; i < n_hmmt && !pb->eof_reached; i++) {
|
||||
int moment_time = avio_rb32(pb);
|
||||
avpriv_new_chapter(c->fc, i, av_make_q(1, 1000), moment_time, AV_NOPTS_VALUE, NULL);
|
||||
|
Loading…
Reference in New Issue
Block a user