aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michael@niedermayer.cc>2021-07-11 14:27:22 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2021-09-09 13:54:52 +0200
commitfb7379f7ef2bf3df27c8e889573b6b0b08da848b (patch)
treee5b297c4b4adf228378d4687afceadaff4c96fcc
parentc9784a783be17dc1c80e3d0f9fe9e0dceff38204 (diff)
downloadffmpeg-fb7379f7ef2bf3df27c8e889573b6b0b08da848b.tar.gz
avformat/mov: do not ignore errors in mov_metadata_hmmt()
Fixes: Timeout Fixes: 35637/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-6311060272447488 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 c52c99a18f6e40973e52d99d4bb29e34a66c695a) Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
-rw-r--r--libavformat/mov.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libavformat/mov.c b/libavformat/mov.c
index f48ed602f5..348c648d60 100644
--- a/libavformat/mov.c
+++ b/libavformat/mov.c
@@ -294,6 +294,8 @@ static int mov_metadata_hmmt(MOVContext *c, AVIOContext *pb, unsigned len)
int moment_time = avio_rb32(pb);
avpriv_new_chapter(c->fc, i, av_make_q(1, 1000), moment_time, AV_NOPTS_VALUE, NULL);
}
+ if (avio_feof(pb))
+ return AVERROR_INVALIDDATA;
return 0;
}