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 63F804BD2A for ; Tue, 4 Feb 2025 02:58:59 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 3DB4568B3AD; Tue, 4 Feb 2025 04:58:55 +0200 (EET) Received: from relay4-d.mail.gandi.net (relay4-d.mail.gandi.net [217.70.183.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0878568A2D1 for ; Tue, 4 Feb 2025 04:58:47 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id C3230443BC for ; Tue, 4 Feb 2025 02:58:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1738637926; 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; bh=+BylIDoNwqU1hxCBdtFXHgGHvSPBwfN1qM7Sc8E0IQE=; b=O1Khsi8XSTEykK9BoWb5xWN9o8JkNeMrmFWrGr8jGSKUFGMCv4bRV0jtlvYsKKjdlZKwH6 TbO5uc67PmGph/OtrrIXM0jlUj305r409aYKED4CosT3wC0k8plk1lmjYQ2i6ZeQlzsihK imsEWrW2arq7BxQSFZXBUaeIWRnHYDAEzYxl1ytbVSmbeXBzu62ME39bY4OjRuNmmejFWN GiDfO1oaHCB2/oajGyGZGp4NtTR6cgnn0F4h5a3g9Ex0WwEd/Y6AGtVGMviTC6qH92RPG8 y6oC7pHx6xAEuOMeuZIBkXikY5U4lh/H/qmvepOkKaaeUeROm2aX2KmloIANkg== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Tue, 4 Feb 2025 03:58:43 +0100 Message-ID: <20250204025845.2059863-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.48.1 MIME-Version: 1.0 X-GND-State: clean X-GND-Score: -85 X-GND-Cause: gggruggvucftvghtrhhoucdtuddrgeefvddrtddtgdduleefiecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfitefpfffkpdcuggftfghnshhusghstghrihgsvgenuceurghilhhouhhtmecufedtudenucesvcftvggtihhpihgvnhhtshculddquddttddmnegfrhhlucfvnfffucdludehmdenucfjughrpefhvffufffkofgggfestdekredtredttdenucfhrhhomhepofhitghhrggvlhcupfhivgguvghrmhgrhigvrhcuoehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgeqnecuggftrfgrthhtvghrnhepjeffueefffevvedthfeuvedtfeejteehieetffehteegvdduudevtdfffeejhfelnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucfkphepgedurdeiiedrieejrdduudefnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehinhgvthepgedurdeiiedrieejrdduudefpdhhvghloheplhhotggrlhhhohhsthdpmhgrihhlfhhrohhmpehmihgthhgrvghlsehnihgvuggvrhhmrgihvghrrdgttgdpnhgspghrtghpthhtohepuddprhgtphhtthhopehffhhmphgvghdquggvvhgvlhesfhhfmhhpvghgrdhorhhg X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 1/3] swscale/swscale: Do not crash on floats 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: Fixes: shift exponent 32 is too large for 32-bit type 'unsigned int' Fixes: division by zero Fixes: 391981061/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-6691017763389440 Fixes: 392929028/clusterfuzz-testcase-minimized-ffmpeg_SWS_fuzzer-5142088307507200 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer --- libswscale/swscale.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libswscale/swscale.c b/libswscale/swscale.c index 98f94d029fb..38b1e198239 100644 --- a/libswscale/swscale.c +++ b/libswscale/swscale.c @@ -623,7 +623,7 @@ av_cold void ff_sws_init_range_convert(SwsInternal *c) { c->lumConvertRange = NULL; c->chrConvertRange = NULL; - if (c->opts.src_range != c->opts.dst_range && !isAnyRGB(c->opts.dst_format)) { + if (c->opts.src_range != c->opts.dst_range && !isAnyRGB(c->opts.dst_format) && c->dstBpc < 32) { init_range_convert_constants(c); if (c->dstBpc <= 14) { if (c->opts.src_range) { -- 2.48.1 _______________________________________________ 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".