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 E0D4947820 for ; Mon, 23 Oct 2023 20:44:15 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1AB8968CA4B; Mon, 23 Oct 2023 23:44:12 +0300 (EEST) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 4B17968AAB6 for ; Mon, 23 Oct 2023 23:44:06 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 6DE4020003 for ; Mon, 23 Oct 2023 20:44:05 +0000 (UTC) Date: Mon, 23 Oct 2023 22:44:04 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20231023204404.GC3543730@pb2> References: <20231022003520.17154-1-michael@niedermayer.cc> <20231022003520.17154-5-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 5/6] avutil/tx_template: fix integer ovberflwo in fft3() 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="===============7233475574999051419==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============7233475574999051419== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="tZrX/RkhQAKJdU33" Content-Disposition: inline --tZrX/RkhQAKJdU33 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, Oct 22, 2023 at 03:55:47AM +0200, Lynne wrote: > Oct 22, 2023, 02:36 by michael@niedermayer.cc: >=20 > > Fixes: signed integer overflow: -1028966111 + -1314089526 cannot be rep= resented in type 'int' > > Fixes: 63174/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_AAC_FIXE= D_fuzzer-5853273711837184 > > > > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz= /tree/master/projects/ffmpeg > > Signed-off-by: Michael Niedermayer > > --- > > libavutil/tx_template.c | 7 ++++--- > > 1 file changed, 4 insertions(+), 3 deletions(-) > > > > diff --git a/libavutil/tx_template.c b/libavutil/tx_template.c > > index 8dc3d2519c1..a2c27465cbc 100644 > > --- a/libavutil/tx_template.c > > +++ b/libavutil/tx_template.c > > @@ -185,10 +185,9 @@ static av_always_inline void fft3(TXComplex *out, = TXComplex *in, > > BF(tmp[1].re, tmp[2].im, in[1].im, in[2].im); > > BF(tmp[1].im, tmp[2].re, in[1].re, in[2].re); > > =20 > > - out[0*stride].re =3D tmp[0].re + tmp[2].re; > > - out[0*stride].im =3D tmp[0].im + tmp[2].im; > > - > > #ifdef TX_INT32 > > + out[0*stride].re =3D (int64_t)tmp[0].re + tmp[2].re; > > + out[0*stride].im =3D (int64_t)tmp[0].im + tmp[2].im; > > mtmp[0] =3D (int64_t)tab[ 8] * tmp[1].re; > > mtmp[1] =3D (int64_t)tab[ 9] * tmp[1].im; > > mtmp[2] =3D (int64_t)tab[10] * tmp[2].re; > > @@ -198,6 +197,8 @@ static av_always_inline void fft3(TXComplex *out, T= XComplex *in, > > out[2*stride].re =3D tmp[0].re - (mtmp[2] - mtmp[0] + 0x40000000 >> 31= ); > > out[2*stride].im =3D tmp[0].im - (mtmp[3] + mtmp[1] + 0x40000000 >> 31= ); > > #else > > + out[0*stride].re =3D tmp[0].re + tmp[2].re; > > + out[0*stride].im =3D tmp[0].im + tmp[2].im; > > tmp[1].re =3D tab[ 8] * tmp[1].re; > > tmp[1].im =3D tab[ 9] * tmp[1].im; > > tmp[2].re =3D tab[10] * tmp[2].re; > > >=20 > lgtm will apply thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB No human being will ever know the Truth, for even if they happen to say it by chance, they would not even known they had done so. -- Xenophanes --tZrX/RkhQAKJdU33 Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEIAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZTbbFAAKCRBhHseHBAsP qwrdAJ4g9dfs4DvDkLdsrextyJa6l+5IVgCggf4i/t4YIUxOp2ZRiQuLPKAtjzg= =a98P -----END PGP SIGNATURE----- --tZrX/RkhQAKJdU33-- --===============7233475574999051419== 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". --===============7233475574999051419==--