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 E0C8F445E9 for ; Sat, 19 Nov 2022 19:49:40 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1ACBC68B3AE; Sat, 19 Nov 2022 21:49:38 +0200 (EET) Received: from relay2-d.mail.gandi.net (relay2-d.mail.gandi.net [217.70.183.194]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0240168AF71 for ; Sat, 19 Nov 2022 21:49:31 +0200 (EET) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 0FA0F40005 for ; Sat, 19 Nov 2022 19:49:29 +0000 (UTC) Date: Sat, 19 Nov 2022 20:49:29 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20221119194929.GA710311@pb2> References: <20221118210918.3169-1-michael@niedermayer.cc> <166886160649.26119.1991147855481578535@lain.khirnov.net> MIME-Version: 1.0 In-Reply-To: <166886160649.26119.1991147855481578535@lain.khirnov.net> Subject: Re: [FFmpeg-devel] [PATCH 1/4] avcodec/tiff: Ignore tile_count 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="===============3316147751362892170==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============3316147751362892170== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="cWoXeonUoKmBZSoM" Content-Disposition: inline --cWoXeonUoKmBZSoM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Nov 19, 2022 at 01:40:06PM +0100, Anton Khirnov wrote: > Quoting Michael Niedermayer (2022-11-18 22:09:15) > > Fixes: out of array access > > Fixes: 52427/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_TIFF_fuz= zer-4849108968144896 > >=20 > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz= /tree/master/projects/ffmpeg > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/tiff.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > >=20 > > diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c > > index cde318d5e5..b962dce5a2 100644 > > --- a/libavcodec/tiff.c > > +++ b/libavcodec/tiff.c > > @@ -994,7 +994,7 @@ static int dng_decode_tiles(AVCodecContext *avctx, = AVFrame *frame, > > tile_count_y =3D (s->height + s->tile_length - 1) / s->tile_length; > > =20 > > /* Iterate over the number of tiles */ > > - for (tile_idx =3D 0; tile_idx < s->tile_count; tile_idx++) { > > + for (tile_idx =3D 0; tile_idx < tile_count_x * tile_count_y; tile_= idx++) { >=20 > Then why store tile_count at all? Seems to be it will just confuse > future readers. >=20 > If I'm reading the code correctly, the only other use of tile_count is > in setting has_tile_bits, but that also checks is_tiled, which is set > together with tile_count. i tend to make minimal changes with the bugfixes but yes you are correct the field seems useless i will remove it in that patch thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Those who are best at talking, realize last or never when they are wrong. --cWoXeonUoKmBZSoM Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCY3kzSAAKCRBhHseHBAsP q5GoAJkBp90yaaY6YB5jLgxKJX0QekHSGQCePptq6c6xlbwOFSmw3uiRO/BeDck= =dPJa -----END PGP SIGNATURE----- --cWoXeonUoKmBZSoM-- --===============3316147751362892170== 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". --===============3316147751362892170==--