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 3FDF548A7E for ; Sat, 27 Apr 2024 18:06:23 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id A5B0E68D29F; Sat, 27 Apr 2024 21:06:20 +0300 (EEST) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 3BC5668CD5C for ; Sat, 27 Apr 2024 21:06:14 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 65BA660002 for ; Sat, 27 Apr 2024 18:06:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1714241173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=QLwJRmCOXRI50JTdhgSDimgu21tZgcEvFioalYY6Jew=; b=DxV9Vp9qSZRu46xTC9oSV9Os0e+3Lw2TyHz6PDEvdMlXwy5rwpI2jCre6X54qJpfLBQRGp lNNHFVFKJfiZcBOo7RjsePoH7RkIGkdOGQWlxKBFvl3gHOeowoVxblKiRRjDLxqX/skFlw 4Z1orvbdBz0aNGcSVq5p0vhrpCzEWv6o7GspXvO4raOJLLTea0KpiXyhtqK1fFlJH9yYZh EBVjrnk66u6sT20K5GisaXoJNLKosqKQa1xAg2UmisexOUNKHw2IQeiQhNSrN88raSm1dc E25VVwCk00ApnuwaDTYEycHQDdY9AFZFE5ewv6QvHKkuNdyPq/DFkFQaFKIPdA== Date: Sat, 27 Apr 2024 20:06:12 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240427180612.GE6420@pb2> References: <20240426030839.3001504-1-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 1/6] avformat/mov: Check tile_item_list 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: multipart/mixed; boundary="===============8792936997162512928==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============8792936997162512928== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="tgLcnEKVJgL9iYmh" Content-Disposition: inline --tgLcnEKVJgL9iYmh Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Apr 26, 2024 at 09:30:50AM -0300, James Almer wrote: > On 4/26/2024 12:08 AM, Michael Niedermayer wrote: > > Fixes: Null pointer dereference > > Fixes: 67861/clusterfuzz-testcase-minimized-ffmpeg_DEMUXER_fuzzer-53526= 28142800896 > >=20 > > 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(+) > >=20 > > diff --git a/libavformat/mov.c b/libavformat/mov.c > > index ecd29a7d08b..97a24e6737e 100644 > > --- a/libavformat/mov.c > > +++ b/libavformat/mov.c > > @@ -9289,6 +9289,9 @@ static int read_image_grid(AVFormatContext *s, co= nst HEIFGrid *grid, > > if (tile_grid->nb_tiles !=3D size) > > return AVERROR_INVALIDDATA; > > + for (int i =3D 0; i < size; i++) > > + if (!grid->tile_item_list[i]) > > + return AVERROR_INVALIDDATA; > > for (int i =3D 0; i < tile_cols; i++) > > tile_grid->coded_width +=3D grid->tile_item_list[i]->width; > > for (int i =3D 0; i < size; i +=3D tile_cols) >=20 > We shouldn't get this far if that's NULL. Does the following also work? >=20 > > diff --git a/libavformat/mov.c b/libavformat/mov.c > > index ecd29a7d08..b21c4b6f3c 100644 > > --- a/libavformat/mov.c > > +++ b/libavformat/mov.c > > @@ -9440,7 +9440,7 @@ static int mov_parse_tiles(AVFormatContext *s) > > break; > > } > >=20 > > - if (k =3D=3D grid->nb_tiles) { > > + if (k =3D=3D mov->nb_heif_item) { works, please apply thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Old school: Use the lowest level language in which you can solve the problem conveniently. New school: Use the highest level language in which the latest supercomputer can solve the problem without the user falling asleep waiting. --tgLcnEKVJgL9iYmh Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZi0+igAKCRBhHseHBAsP qwnOAJ9/fsgbwE7Ea3jEALUenP+1SL98vwCdE0BCAiIQEc34ZQ4wKB1+oi52Qcs= =ZoxT -----END PGP SIGNATURE----- --tgLcnEKVJgL9iYmh-- --===============8792936997162512928== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ 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". --===============8792936997162512928==--