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 BEC7A4A5FE for ; Mon, 1 Apr 2024 20:56:25 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 70BAB68CF84; Mon, 1 Apr 2024 23:56:16 +0300 (EEST) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E860F68CA9C for ; Mon, 1 Apr 2024 23:56:09 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 401DDC0002 for ; Mon, 1 Apr 2024 20:56:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1712004969; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:in-reply-to:in-reply-to:references:references; bh=NSrJuS28Vq3JAU8SnzWD08kIMGFFF2Se9JvQRlhBrmY=; b=Hguh44f8AaJmt4IoiWHocA6dNIYtEnBcAaa2400JZNb40t3jjKTmYDIgZDSFvWN1lnYApC vc7Rf0SnGoGrhNqb+d91lF94dsJthGezQqA9spaTXrHzkkPLowfEAzKyGm9I1Ay+v/nJRj fLYH6hkRasdPekkajTfi2i+UPzM7glLcic77yECM27lsVSyPLgi1HU/+tvdpcSlhbOKfZc 2MzoqRm0N8Vt/k6twvJ4nEYMF/k932RiOD0aPEMPzW170rDEd6boxt3P7cRmfXO9m2nB9/ dsQFnfhmkge2KhBHKTsnndabpAV303ks40ucebAEyJUlFMDP1QfjB8wYT2QdqQ== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 1 Apr 2024 22:56:03 +0200 Message-Id: <20240401205607.9093-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20240401205607.9093-1-michael@niedermayer.cc> References: <20240401205607.9093-1-michael@niedermayer.cc> X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 2/6] avformat/mov: Check that tile_item_list is initialized in read_image_iovl() 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 MIME-Version: 1.0 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: null pointer dereference Fixes: 67494/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-6528714521247744 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavformat/mov.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libavformat/mov.c b/libavformat/mov.c index 7bdeeb99f98..fa4c237c0d8 100644 --- a/libavformat/mov.c +++ b/libavformat/mov.c @@ -9364,6 +9364,10 @@ static int read_image_iovl(AVFormatContext *s, const HEIFGrid *grid, } for (int i = 0; i < tile_grid->nb_tiles; i++) { + if (!grid->tile_item_list[i]) { + ret = AVERROR_INVALIDDATA; + goto fail; + } tile_grid->offsets[i].idx = grid->tile_item_list[i]->st->index; tile_grid->offsets[i].horizontal = (flags & 1) ? avio_rb32(s->pb) : avio_rb16(s->pb); tile_grid->offsets[i].vertical = (flags & 1) ? avio_rb32(s->pb) : avio_rb16(s->pb); -- 2.17.1 _______________________________________________ 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".