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 38B3E4D13B for ; Fri, 30 May 2025 19:53:08 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.ffmpeg.org (Postfix) with ESMTP id 6444968DE5C; Fri, 30 May 2025 22:53:03 +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 643A068D992 for ; Fri, 30 May 2025 22:52:56 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 825D91F47D; Fri, 30 May 2025 19:52:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1748634775; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=s5go6/obkCrV4etkr3qcI7h9xnAPYBj4FJ6rdEJ7ez4=; b=TnMujllB4unl9fHiECNRUiZq6o0fv4LFq/bAmHRAmMxZvMiXSW4Wgf/K2Md9DlI9Bo+UdI tWMhSv4bi0+UKmxBItCDaKSTDzJH+ku6yHed5omjFNTd+QRqRIuSlGTjtoVpk2GKUkKIgb vTlizkk/HkRdF8uYcFd0rWk3mmtuBTxZFz+flFHD/wqeN8Id5PqMrH5M7DEhQ0qkqS4xzE WmtJQV/xhMs1mudbwUb72EAeHwe96YSlPB6oFzLx/FwxNE6ef8XtawcmqP9TuroXfgxXVR 1sbe5JlshPz+F8eB9ZcVD05ubrX1sUI0PMU4xRLlDrxVxl16z7FpvhERpOtjlQ== Date: Fri, 30 May 2025 21:52:54 +0200 From: Michael Niedermayer To: FFmpeg development discussions and patches Message-ID: <20250530195254.GN29660@pb2> References: <20250514013954.2987037-1-michael@niedermayer.cc> <20250514013954.2987037-2-michael@niedermayer.cc> MIME-Version: 1.0 In-Reply-To: <20250514013954.2987037-2-michael@niedermayer.cc> X-GND-State: clean X-GND-Score: -90 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtddtgddvleeltdculddtuddrgeefvddrtddtmdcutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdluddtmdenucfjughrpeffhffvvefukfhfgggtuggjsehgtderredttddvnecuhfhrohhmpefoihgthhgrvghlucfpihgvuggvrhhmrgihvghruceomhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtqeenucggtffrrghtthgvrhhnpeelhfekteehteevveetffdtudeuleegvdfhteevfeevgeeglefgudfgledukeeigfenucffohhmrghinhepghhithhhuhgsrdgtohhmpdhffhhmphgvghdrohhrghenucfkphepgedurdeiiedrieejrdduudefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieejrdduudefpdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgdpnhgspghrtghpthhtohepvddprhgtphhtthhopehffhhmphgvghdquggvvhgvlhesfhhfmhhpvghgrdhorhhgpdhrtghpthhtohepmhgrnhhuvghlrdhlrghushhssehgmhgrihhlrdgtohhm 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 Cc: Manuel Lauss Content-Type: multipart/mixed; boundary="===============6773026050436540107==" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: --===============6773026050436540107== Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="234bxgL+PJbHR/kO" Content-Disposition: inline --234bxgL+PJbHR/kO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable 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 >=20 > This needs review >=20 > Fixes: out of array read > Fixes: 409593384/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_SANM_f= uzzer-6488251907244032 >=20 > Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/t= ree/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 thx >=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, GetByteC= ontext *gb, int top, int le > } > =20 > /* smooth top and left block borders with neighbours */ > - if (((pxoff - p + k) < 0) || ((pxoff - p + k) >=3D maxpxo) > + if (((pxoff - p + 0) < 0) || ((pxoff - p + k) >=3D maxpxo) > || ((pxoff + 3 * p) < 0) || ((pxoff + 3 * p) >=3D maxpxo) > || (i =3D=3D 0) || (j =3D=3D 0)) > continue; > --=20 > 2.49.0 >=20 > _______________________________________________ > ffmpeg-devel mailing list > ffmpeg-devel@ffmpeg.org > https://ffmpeg.org/mailman/listinfo/ffmpeg-devel >=20 > To unsubscribe, visit link above, or email > ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe". >=20 --=20 Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB The smallest minority on earth is the individual. Those who deny=20 individual rights cannot claim to be defenders of minorities. - Ayn Rand --234bxgL+PJbHR/kO Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iF0EABEKAB0WIQSf8hKLFH72cwut8TNhHseHBAsPqwUCaDoMlgAKCRBhHseHBAsP q8b8AJ462j9+cABwH27/LFb63eppu/x3QQCaA0qbhnDeaie2DdBJE6L3rBHuSxs= =8+bJ -----END PGP SIGNATURE----- --234bxgL+PJbHR/kO-- --===============6773026050436540107== 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". --===============6773026050436540107==--