diff options
author | Michael Niedermayer <michael@niedermayer.cc> | 2023-11-08 01:37:11 +0100 |
---|---|---|
committer | Michael Niedermayer <michael@niedermayer.cc> | 2023-11-10 00:14:02 +0100 |
commit | 19fcf4313148e86aa47d81a8d5d5e8d056f1f906 (patch) | |
tree | 636c53323ff6b5668f669c3fd48a28464f927cad /libavformat | |
parent | 96d2a40b9ee0ddd1844b82c23a074804c316caa5 (diff) | |
download | ffmpeg-19fcf4313148e86aa47d81a8d5d5e8d056f1f906.tar.gz |
avformat/mov: Disallow FTYP after streams
Fixes: Assertion !c->fc->nb_streams failed at libavformat/mov.c:7799
Fixes: 63875/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-5479178702815232
Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
Diffstat (limited to 'libavformat')
-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 e8efccf6eb..34ca8095c2 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -1222,6 +1222,8 @@ static int mov_read_ftyp(MOVContext *c, AVIOContext *pb, MOVAtom atom) int ret = ffio_read_size(pb, type, 4); if (ret < 0) return ret; + if (c->fc->nb_streams) + return AVERROR_INVALIDDATA; if (strcmp(type, "qt ")) c->isom = 1; |