From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.ffmpeg.org (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id CD29C4BEFF for ; Fri, 30 May 2025 22:51:42 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 6F4BC68DCF7; Sat, 31 May 2025 01:51:39 +0300 (EEST) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTPS id 81AB868DBDF for ; Sat, 31 May 2025 01:51:32 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id DD11D1F4F3 for ; Fri, 30 May 2025 22:51:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1748645492; 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=NhB8DxYzi09nFKmSQB2q23SYyzVcUqMMJY4yAPPtNPM=; b=afsYzf5RBZJgD5uNMrDEycO3ttspPIAsvoSkjsvBoeMJoW04GCMVP6FY5XjgPuf5g0nqPq dr7VMb/1CyeI88t6J3A+G/MuILqNsO7rIuU5yAuyz0w4Uwt/v+0coQ017x0QvmX3rxKkFm HAk5cdn/v6a5+Gy+zTiidNnwkFEUj5UeJGIFPqYDQmAI+OLJUkoZHHv12WOZjyejqIGa87 m8LVGO7ISKKGuwkNpXdVHdK9rnNMx9v0dfnNxWGUwqfKOrEJ0wXw5EEV5U4W9ciFYMnMju FN665nOiuxO7UiLUKbU79i7pUg6VRxDmZVQjzgzwENIjR7vy16qwtS5FhieVDg== Date: Sat, 31 May 2025 00:51:30 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20250530225130.GQ29660@pb2> References: <20250514013954.2987037-1-michael@niedermayer.cc> <20250514013954.2987037-2-michael@niedermayer.cc> <20250530195254.GN29660@pb2> MIME-Version: 1.0 In-Reply-To: X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddtgdeftddvheculddtuddrgeefvddrtddtmdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdludehmdenucfjughrpeffhffvuffkfhggtggujgesghdtreertddtjeenucfhrhhomhepofhitghhrggvlhcupfhivgguvghrmhgrhigvrhcuoehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgeqnecuggftrfgrthhtvghrnhepfeetffetheehtdevjeffleelteefjeeugeeiheekhfefudehkedtkedufeeuveelnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepgedurdeiiedrieejrdduudefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieejrdduudefpdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgdpnhgspghrtghpthhtohepuddprhgtphhtthhopehffhhmphgvghdquggvvhgvlhesfhhfmhhpvghgrdhorhhg X-GND-Sasl: michael@niedermayer.cc Subject: Re: [FFmpeg-devel] [PATCH 2/2] avcodec/sanm: avoid using k in left pxoff check 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="===============8776675887481872147==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============8776675887481872147== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="q6yGgI3wmXwTsg3x" Content-Disposition: inline --q6yGgI3wmXwTsg3x Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Manuel On Fri, May 30, 2025 at 10:54:01PM +0200, Manuel Lauss wrote: > Hi Michael, >=20 > On Fri, May 30, 2025 at 9:52=E2=80=AFPM Michael Niedermayer > wrote: > > > > Hi Manual > > > > On Wed, May 14, 2025 at 03:39:53AM +0200, Michael Niedermayer wrote: > > > k is always 4 here and it seems this is not what was intended > > > replacing it with 0 works but it may be wrong > > > > > > This needs review > > > > > > Fixes: out of array read > > > Fixes: 409593384/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SA= NM_fuzzer-6488251907244032 > > > > > > Found-by: continuous fuzzing process https://github.com/google/oss-fu= zz/tree/master/projects/ffmpeg > > > Signed-off-by: Michael Niedermayer > > > --- > > > libavcodec/sanm.c | 2 +- > > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > please review, this patch is just written based on gut feeling, > > its just clear that the code before was buggy >=20 > > > > > > diff --git a/libavcodec/sanm.c b/libavcodec/sanm.c > > > index 00bfef00fe8..ec429e1a002 100644 > > > --- a/libavcodec/sanm.c > > > +++ b/libavcodec/sanm.c > > > @@ -734,7 +734,7 @@ static int old_codec4(SANMVideoContext *ctx, GetB= yteContext *gb, int top, int le > > > } > > > > > > /* smooth top and left block borders with neighbours */ > > > - if (((pxoff - p + k) < 0) || ((pxoff - p + k) >=3D maxpx= o) > > > + if (((pxoff - p + 0) < 0) || ((pxoff - p + k) >=3D maxpx= o) > > > || ((pxoff + 3 * p) < 0) || ((pxoff + 3 * p) >=3D ma= xpxo) > > > || (i =3D=3D 0) || (j =3D=3D 0)) > > > continue; >=20 > Oops, yes, that change is correct. will apply > I think you should just rip the whole block-smoothing block out > entirely: it creates a "sawtooth" pattern > which is more annoying than the "blockiness" it tries to soften. probably, but i just wanted to fix the out of array access, ill leave improvment beyond that to others thx --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Rewriting code that is poorly written but fully understood is good. Rewriting code that one doesnt understand is a sign that one is less smart than the original author, trying to rewrite it will not make it better. --q6yGgI3wmXwTsg3x Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaDo2bwAKCRBhHseHBAsP q4fjAJ45qEdMxQyIzrgRh0ueRDWJL8frGgCdG8mEj7QBrNOMw/KgFihSOb2ZVLQ= =w7ls -----END PGP SIGNATURE----- --q6yGgI3wmXwTsg3x-- --===============8776675887481872147== 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". --===============8776675887481872147==--