From 9132a0fbe25d472952872c67abe818aec5d64e4a Mon Sep 17 00:00:00 2001 From: Vignesh Venkatasubramanian via ffmpeg-devel Date: Tue, 3 Oct 2023 16:04:19 -0700 Subject: avformat/mov: Disallow more than one meta box for AVIF This is not allowed per the spec. Signed-off-by: Vignesh Venkatasubramanian Reviewed-by: Vittorio Giovara Signed-off-by: Michael Niedermayer --- libavformat/mov.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'libavformat') diff --git a/libavformat/mov.c b/libavformat/mov.c index 13ddedcac1..5cc8cd9eb9 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -4903,6 +4903,8 @@ static int avif_add_stream(MOVContext *c, int item_id) { MOVStreamContext *sc; AVStream *st; + if (c->fc->nb_streams) + return AVERROR_INVALIDDATA; int item_index = -1; for (int i = 0; i < c->avif_info_size; i++) if (c->avif_info[i].item_id == item_id) { -- cgit v1.2.3