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 A09AC41115 for ; Thu, 12 Jan 2023 14:28:21 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 70E1A68A531; Thu, 12 Jan 2023 16:28:18 +0200 (EET) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 34423689D4A for ; Thu, 12 Jan 2023 16:28:12 +0200 (EET) Received: (Authenticated sender: michael@niedermayer.cc) by mail.gandi.net (Postfix) with ESMTPSA id 43B481BF20B for ; Thu, 12 Jan 2023 14:28:10 +0000 (UTC) Date: Thu, 12 Jan 2023 15:28:10 +0100 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20230112142810.GH1949656@pb2> References: <20230111235432.2135-1-michael@niedermayer.cc> <20230111235432.2135-4-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: Subject: Re: [FFmpeg-devel] [PATCH 4/6] avcodec/sgidec: do not forget the number of components in read_uncompressed_sgi() 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="===============8317048107526531873==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============8317048107526531873== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="bpVaumkpfGNUagdU" Content-Disposition: inline --bpVaumkpfGNUagdU Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 12, 2023 at 01:02:57AM +0100, Andreas Rheinhardt wrote: > Michael Niedermayer: > > Fixes: out of array access > > Fixes: 48567/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SGI_fuzz= er-6704753329700864 > > Fixes: 48567/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SGI_fuzz= er-6683986844057600 > > Fixes: 48567/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SGI_fuzz= er-6697387691474944 > >=20 > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz= /tree/master/projects/ffmpeg > > Signed-off-by: Michael Niedermayer > > --- > > libavcodec/sgidec.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > >=20 > > diff --git a/libavcodec/sgidec.c b/libavcodec/sgidec.c > > index 6ff2ee97f6..92083f23de 100644 > > --- a/libavcodec/sgidec.c > > +++ b/libavcodec/sgidec.c > > @@ -159,7 +159,7 @@ static int read_uncompressed_sgi(uint8_t *const out= [4], const ptrdiff_t stride[4 > > unsigned rowsize =3D width * bytes_per_channel; > > =20 > > /* Test buffer size. */ > > - if (rowsize * (int64_t)height > bytestream2_get_bytes_left(g)) > > + if (rowsize * (int64_t)height * nb_components > bytestream2_get_by= tes_left(g)) > > return AVERROR_INVALIDDATA; > > =20 > > for (unsigned z =3D 0; z < nb_components; z++) { >=20 > LGTM. (Sorry for having forgotten this in > ce4713ea731b9deb0440abe8d8a2a41d2957efc5.) will apply thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Concerning the gods, I have no means of knowing whether they exist or not or of what sort they may be, because of the obscurity of the subject, and the brevity of human life -- Protagoras --bpVaumkpfGNUagdU Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCY8AY8gAKCRBhHseHBAsP q6D9AJ97vqgAwTZLdgJIxVJg9ncoVFYjBQCfaPRtuBMAGBHXszlzRilK7/aKEVQ= =FZVC -----END PGP SIGNATURE----- --bpVaumkpfGNUagdU-- --===============8317048107526531873== 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". --===============8317048107526531873==--