From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTP id 3223248DBA for ; Fri, 26 Apr 2024 23:53:03 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 732C368D412; Sat, 27 Apr 2024 02:52:26 +0300 (EEST) Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 7815768D32B for ; Sat, 27 Apr 2024 02:52:16 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id D58581C0002 for ; Fri, 26 Apr 2024 23:52:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1714175536; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=BZBOoVdU1XEBAu3slWGgA4uMPZVUhsmPecx5J49y7mc=; b=V50X7DUyWxoabsvbTftsIAr1UWaVVDBhW2BK+cG/SkEar4KHkWNVx3KyKFE+RX/fQ/wyBr CcjtSbbrTyd0GFytVDcht1kviAV5pcf4V5uEdIl948zflVg50nzZcs7j7g7n0F8lri82EM pcSZOt/0m3kP1VTIVzQKfKq8v8dsz2t0F83O6NbDoVqkXVXx9eF3Zm5mlDoOL1niHFUmby PuVj0ScCcnrlOca5xGPQGJLuIoBfTXEwQFx0A2Wz0/9+pcNGkRxyrjL/IO+argyYyndVJj Z5wzT2j1jAWbEyNbu0Mr7ji72+4MzRfeITPsUeokdq6XnnEYWtHarb71Yr1lXA== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Sat, 27 Apr 2024 01:52:11 +0200 Message-ID: <20240426235211.3718252-5-michael@niedermayer.cc> X-Mailer: git-send-email 2.43.2 In-Reply-To: <20240426235211.3718252-1-michael@niedermayer.cc> References: <20240426235211.3718252-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 5/5] avformat/mov: Check if heif item name is already allocated X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: Fixes: memleak Fixes: 68212/clusterfuzz-testcase-minimized-ffmpeg_dem_MOV_fuzzer-4963488540721152 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/mov.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index 97a24e6737e..5b8278f736e 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -8136,6 +8136,9 @@ static int mov_read_infe(MOVContext *c, AVIOContext *pb, MOVAtom atom, int idx) avio_rb24(pb); // flags. size -= 4; + if (c->heif_item[idx].name) + return AVERROR_INVALIDDATA; + if (version < 2) { avpriv_report_missing_feature(c->fc, "infe version < 2"); return 1; -- 2.43.2 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".