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 ESMTPS id 096C04ECA4 for ; Wed, 14 May 2025 01:40:18 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id B040D68BC1C; Wed, 14 May 2025 04:40:05 +0300 (EEST) Received: from relay3-d.mail.gandi.net (relay3-d.mail.gandi.net [217.70.183.195]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id E3EBA68B8BF for ; Wed, 14 May 2025 04:39:56 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 30E091FCEC for ; Wed, 14 May 2025 01:39:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1747186796; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=AY0DB49flyDAK+//3MiKOkeLLHfB8RoXDAkuqwrrv2Q=; b=Z4no1K84/K88sEMmWKsOoVJ5P/ea49hA6Jn7mwnxQ3B9HuQJrop8On2WEZyd43uJNUqMZs m52g9HwqMs4qihOhn5TjE44lMePTZxD7AbFth8DFV/T3cKTqOMJn0Nmjv0R984GOybQBAc VYHCCFpQwE2l/KjoSbvUDVhVz1PQS5yoEozefWvOdfrrPKYoOagU36r0+2xJ9LNTHit7Is 4uyhO0iW8bEtvxREP5YZPoKegpszHbZwAFSSFZx48nwUWIYbnRmMuQDPprI2so2dNfLhyx QvsL0kVP7YKgd/Qtr1QjYlWOs1761RMPe1zfpSEC3rAo6RHG00Jztob+PMT5ow== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Wed, 14 May 2025 03:39:53 +0200 Message-ID: <20250514013954.2987037-2-michael@niedermayer.cc> X-Mailer: git-send-email 2.49.0 In-Reply-To: <20250514013954.2987037-1-michael@niedermayer.cc> References: <20250514013954.2987037-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdeftdehieelucetufdoteggodetrfdotffvucfrrhhofhhilhgvmecuifetpfffkfdpucggtfgfnhhsuhgsshgtrhhisggvnecuuegrihhlohhuthemuceftddunecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenfghrlhcuvffnffculdduhedmnecujfgurhephffvufffkffojghfggfgsedtkeertdertddtnecuhfhrohhmpefoihgthhgrvghlucfpihgvuggvrhhmrgihvghruceomhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtqeenucggtffrrghtthgvrhhnpeegjefhteeghffgledugedvuddvffegfedvtdehteelhfeuiedtveffveefheehgfenucffohhmrghinhepghhithhhuhgsrdgtohhmnecukfhppeeguddrieeirdeijedruddufeenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepihhnvghtpeeguddrieeirdeijedruddufedphhgvlhhopehlohgtrghlhhhoshhtpdhmrghilhhfrhhomhepmhhitghhrggvlhesnhhivgguvghrmhgrhigvrhdrtggtpdhnsggprhgtphhtthhopedupdhrtghpthhtohepfhhfmhhpvghgqdguvghvvghlsehffhhmphgvghdrohhrgh X-GND-Sasl: michael@niedermayer.cc Subject: [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: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: 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_SANM_fuzzer-6488251907244032 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libavcodec/sanm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, GetByteContext *gb, int top, int le } /* smooth top and left block borders with neighbours */ - if (((pxoff - p + k) < 0) || ((pxoff - p + k) >= maxpxo) + if (((pxoff - p + 0) < 0) || ((pxoff - p + k) >= maxpxo) || ((pxoff + 3 * p) < 0) || ((pxoff + 3 * p) >= maxpxo) || (i == 0) || (j == 0)) continue; -- 2.49.0 _______________________________________________ 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".