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>
(cherry picked from commit 19fcf43131)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
release/6.0
Michael Niedermayer 1 year ago
parent 34ef4e9d46
commit dcaadb2a10
No known key found for this signature in database
GPG Key ID: B18E8928B3948D64
  1. 2
      libavformat/mov.c

@ -1131,6 +1131,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;

Loading…
Cancel
Save