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 04B094B58A for ; Mon, 8 Jul 2024 22:25:24 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 48B6E68DCE9; Tue, 9 Jul 2024 01:24:36 +0300 (EEST) 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 0620268DC8E for ; Tue, 9 Jul 2024 01:24:19 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 4A0D7E0004 for ; Mon, 8 Jul 2024 22:24:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1720477459; 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=LU2rn/xf0vBJRjASokmxZ9i0wE6HY4ChOQk/g6f8bcY=; b=Eu+w2OcUXpg+kxiN/+1QMgTX00wLJ41huL+xo8azJHCjvNyLysidXhYvsGV+QvkBnkBVU9 YCSXJauJGxlWrk/16fliQsBlLuPxWoKJ9gYQ0YCPfltu+K8T+AMUW2mdlWE6iYjpaWbxEH L+e+w4Ht21hr7QmHXfF1FMvt68Dz+utghkFOd1oSlIFtkqFOH01Arkc2/NkTmnIc2jz+6T u5aP+QLZdFHg1Bjia7iszjOxrGICrWAcx8gS1S6hb3eqc+ihZ5PTr/dvD0YW+f3Ke4rbgJ WaGc16HnY2Lf5ZcBwjb01DRpZpc6lJhf4zz0jp/ftsAYmT34wtlA2a+jZb1IAA== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Tue, 9 Jul 2024 00:24:10 +0200 Message-ID: <20240708222410.773456-8-michael@niedermayer.cc> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20240708222410.773456-1-michael@niedermayer.cc> References: <20240708222410.773456-1-michael@niedermayer.cc> MIME-Version: 1.0 X-GND-Sasl: michael@niedermayer.cc Subject: [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: 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) av_log(ctx, AV_LOG_ERROR, "Rescaled value for width or height is too big.\n"); /* TODO: make algorithm configurable */ -- 2.45.2 _______________________________________________ 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".