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 1216C4B5BD for ; Tue, 9 Jul 2024 06:59:15 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 1809868D914; Tue, 9 Jul 2024 09:59:13 +0300 (EEST) Received: from mail0.khirnov.net (red.khirnov.net [176.97.15.12]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id BBB6A68D835 for ; Tue, 9 Jul 2024 09:59:06 +0300 (EEST) Authentication-Results: mail0.khirnov.net; dkim=pass (2048-bit key; unprotected) header.d=khirnov.net header.i=@khirnov.net header.a=rsa-sha256 header.s=mail header.b=NBDRnnK8; dkim-atps=neutral Received: from localhost (localhost [IPv6:::1]) by mail0.khirnov.net (Postfix) with ESMTP id 83BC0240DAC for ; Tue, 9 Jul 2024 08:59:06 +0200 (CEST) Received: from mail0.khirnov.net ([IPv6:::1]) by localhost (mail0.khirnov.net [IPv6:::1]) (amavis, port 10024) with ESMTP id 06ZkMXjbJt8l for ; Tue, 9 Jul 2024 08:59:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=khirnov.net; s=mail; t=1720508345; bh=hykPRdNRv+AItotLBW7USF7/TG0mguuEnYmpKL8E1y4=; h=Subject:From:To:In-Reply-To:References:Date:From; b=NBDRnnK8lwMOEhPO0UfslXxPgyxclLtp62M7O/9VjPqLSSzVZXVb+K9RIU1VLzFN9 7Pzt3jQ0Urme+9AFf5MDOr8ZMH+RUgwEAgxP35e0NXmlQopk2ygw5gcYNAMr17GO9P Khnvf/5DUUK1A+YpiuxcfhXAQidimSJ2KJ/6aFo83bqc2261aKZQkEHdcRufROFtHV Rrspkv8jXK2jYJkfM97hbYzwysYBqYygtT0XO8PR6ex0RsoHI1Hm6CV2mlXXX8S9Tm ET9tkDhdnvsM+zSHTipxYkA8rYI8QjI9nBbFvxu/hQR3p1bANVRukw7nvErmUnCj0X Dj5XFEwS0v0wg== Received: from lain.khirnov.net (lain.khirnov.net [IPv6:2001:67c:1138:4306::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "lain.khirnov.net", Issuer "smtp.khirnov.net SMTP CA" (verified OK)) by mail0.khirnov.net (Postfix) with ESMTPS id AC2A42404E5 for ; Tue, 9 Jul 2024 08:59:05 +0200 (CEST) Received: by lain.khirnov.net (Postfix, from userid 1000) id 9C71E1601B9; Tue, 9 Jul 2024 08:59:05 +0200 (CEST) From: Anton Khirnov To: FFmpeg development discussions and patches In-Reply-To: <20240708222410.773456-8-michael@niedermayer.cc> References: <20240708222410.773456-1-michael@niedermayer.cc> <20240708222410.773456-8-michael@niedermayer.cc> Mail-Followup-To: FFmpeg development discussions and patches Date: Tue, 09 Jul 2024 08:59:05 +0200 Message-ID: <172050834561.21847.9572750078971508512@lain.khirnov.net> User-Agent: alot/0.8.1 MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH 8/8] avfilter/vf_scale: Cleanup some checks 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: Quoting Michael Niedermayer (2024-07-09 00:24:10) > Fixes: CID1513722 Operands don't affect result > > Sponsored-by: Sovereign Tech Fund > Signed-off-by: Michael Niedermayer > --- > libavfilter/vf_scale.c | 6 ++---- > 1 file changed, 2 insertions(+), 4 deletions(-) > > diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c > index bf09196e10d..120ff473f2e 100644 > --- a/libavfilter/vf_scale.c > +++ b/libavfilter/vf_scale.c > @@ -645,10 +645,8 @@ static int config_props(AVFilterLink *outlink) > if (ret < 0) > goto fail; > > - if (outlink->w > INT_MAX || > - outlink->h > INT_MAX || > - (outlink->h * inlink->w) > INT_MAX || > - (outlink->w * inlink->h) > INT_MAX) > + if ((outlink->h * (int64_t)inlink->w) > INT_MAX || > + (outlink->w * (int64_t)inlink->h) > INT_MAX) assumes int is smaller than 64bit -- Anton Khirnov _______________________________________________ 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".