mirror of
https://github.com/nyanmisaka/ffmpeg-rockchip.git
synced 2026-01-23 18:11:11 +01:00
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>
This commit is contained in:
parent
cf5cdc5a29
commit
422ce1f21a
1 changed files with 2 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue