[FFmpeg-devel] [PATCH 1/3] avformat/mov: Disallow FTYP after streams
Dale Curtis
dalecurtis at chromium.org
Fri Dec 1 20:27:20 EET 2023
FWIW, this ends up breaking files which are basically just
concatenated fragmented mp4 files -- which is pretty sketchy, but we had
some test content doing that:
https://storage.googleapis.com/chromiumos-test-assets-public/Shaka-Dash/switch_1080p_720p.mp4
Is that intentional? Or should an alternate fix where duplicate ftyp is
ignored be considered?
- dale
On Tue, Nov 7, 2023 at 6:12 PM Michael Niedermayer <michael at niedermayer.cc>
wrote:
> 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
> <https://github.com/google/oss-fuzz/tree/master/projects/ffmpegSigned-off-by>:
> Michael Niedermayer <michael at niedermayer.cc>
> ---
> libavformat/mov.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/libavformat/mov.c b/libavformat/mov.c
> index e8efccf6ebf..34ca8095c22 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;
> --
> 2.17.1
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request at ffmpeg.org with subject "unsubscribe".
>
More information about the ffmpeg-devel
mailing list