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 C8AE74BA2D for ; Wed, 10 Jul 2024 16:19:21 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 2A7BC68DBB0; Wed, 10 Jul 2024 19:19:19 +0300 (EEST) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9112B68DA91 for ; Wed, 10 Jul 2024 19:19:17 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 97416FF807 for ; Wed, 10 Jul 2024 16:19:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1720628356; 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=ib1BLcJqT/mL0MPGmX69AfkNN7sDXKYDR705cEwGUoE=; b=dzzhGddYv5O0nrxV1OM8mJ4NSXZO8BFZ0WkYA3mmtA9TScaIxkq6titL93oORXzEXrP0Hp tc9Z3PL7Bft1zOmzHoED7qUgrv2AOlcom/qikDJIIzpaIjNd3s+VR40Ew74f4SWJpCEv7N pFZLQrC7vYGSLROEwUFIwcnvUTGF044ltDQ5q8Sv170oW0VaIEk8WjQRugxUE8MzIY0Ftz 4ULALMwrz0Ip91kBT4wgqaiTONx6FpkHlSPV1QSQ5v+cZ+fS/JrGUIRMaRsGniu3CwA3Zg KW5yh8VJRj160Xo7ZlezKKL6tArBHkyEiU8DF+UpMbEFItkoC/20X9/Yw44AiQ== Date: Wed, 10 Jul 2024 18:19:15 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20240710161915.GJ4991@pb2> References: <60EF3818-98FC-441B-87D5-4494623799E9@gmail.com> MIME-Version: 1.0 In-Reply-To: <60EF3818-98FC-441B-87D5-4494623799E9@gmail.com> X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH] lavfi/perlin: Fix out of bounds stack buffer write 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="===============6398626376052739994==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============6398626376052739994== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="djsmrO0QNMuttZWM" Content-Disposition: inline --djsmrO0QNMuttZWM Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jul 09, 2024 at 02:41:16PM +0200, epirat07@gmail.com wrote: >=20 >=20 > On 6 Jul 2024, at 11:26, Stefano Sabatini wrote: >=20 > > On date Tuesday 2024-07-02 20:38:00 +0200, Marvin Scholz wrote: > >> An incorrect calculation in ff_perlin_init causes a write to the > >> stack array at index 256, which is out of bounds. > >> > >> Fixes: CID1608711 > >> --- > >> libavfilter/perlin.c | 2 +- > >> 1 file changed, 1 insertion(+), 1 deletion(-) > >> > >> diff --git a/libavfilter/perlin.c b/libavfilter/perlin.c > >> index 09bae7ad33..ffad8c1e4e 100644 > >> --- a/libavfilter/perlin.c > >> +++ b/libavfilter/perlin.c > >> @@ -129,7 +129,7 @@ int ff_perlin_init(FFPerlin *perlin, double period= , int octaves, double persiste > >> for (i =3D 0; i < 256; i++) { > >> unsigned int random_idx =3D av_lfg_get(&lfg) % (256-i); > >> uint8_t random_val =3D random_permutations[random_idx]; > >> - random_permutations[random_idx] =3D random_permutations[2= 56-i]; > >> + random_permutations[random_idx] =3D random_permutations[2= 55-i]; > >> > >> perlin->permutations[i] =3D perlin->permutations[i+256] = =3D random_val; > >> } > > > > Looks good, thanks. >=20 > Please push then, I do not have commit access. applied thx [...] --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Awnsering whenever a program halts or runs forever is On a turing machine, in general impossible (turings halting problem). On any real computer, always possible as a real computer has a finite number of states N, and will either halt in less than N cycles or never halt. --djsmrO0QNMuttZWM Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCZo60gwAKCRBhHseHBAsP q5udAJsFuw84x3QtqfafzaOovuUfKSut6gCcD4EGe3WKLzpuBpIDKDQ0nIW01BQ= =ks0e -----END PGP SIGNATURE----- --djsmrO0QNMuttZWM-- --===============6398626376052739994== 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". --===============6398626376052739994==--