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 671E849144 for ; Mon, 8 Jul 2024 22:25:14 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id BBF1168DCDA; Tue, 9 Jul 2024 01:24:29 +0300 (EEST) Received: from relay8-d.mail.gandi.net (relay8-d.mail.gandi.net [217.70.183.201]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 5C1A768DC18 for ; Tue, 9 Jul 2024 01:24:19 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id 92F851BF204 for ; Mon, 8 Jul 2024 22:24:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1720477458; 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=0W1lVMhMnw9hAF+pvH7WyagEdkd5iAH7tbN6JJaYQ+I=; b=X6MscEpNs6kD240nlZ1tl+j9D32lLSjt7LAisjMFgpaBZJjpsCWVXaqZIP/ZcUemxbKH7G Sw98DY2ummOLJ1wxHbTE4wEd0NQCyxTkp5ksy5xM9O4CRj2eEhTlAGWdneQTnOL/584LFd ua01VC/5Z8NniOcDgiwOl9Zw9bodi6nSvVFjnEhtprqF5VlTM9SSWBqWyZjmZXxAbppDjV 9TMvekhlJuV6tkkCM6NjyPwP6+ypYDoLqDBjeAZ59CCSdNZqtOgJBDSH4eWDzlPs1d0Zg2 i72oAdKXACzLyT+08qwQQ/X6mQv+0SCVoCs3Xy27BBbyAZsjMX32gcuE/NsIZA== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Tue, 9 Jul 2024 00:24:09 +0200 Message-ID: <20240708222410.773456-7-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 7/8] avfilter/vf_scale: Check ff_scale_adjust_dimensions() for failure 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: Helps: CID1513722 Operands don't affect result Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavfilter/vf_scale.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libavfilter/vf_scale.c b/libavfilter/vf_scale.c index 841075193e6..bf09196e10d 100644 --- a/libavfilter/vf_scale.c +++ b/libavfilter/vf_scale.c @@ -638,10 +638,13 @@ static int config_props(AVFilterLink *outlink) outlink->w = scale->w; outlink->h = scale->h; - ff_scale_adjust_dimensions(inlink, &outlink->w, &outlink->h, + ret = ff_scale_adjust_dimensions(inlink, &outlink->w, &outlink->h, scale->force_original_aspect_ratio, scale->force_divisible_by); + if (ret < 0) + goto fail; + if (outlink->w > INT_MAX || outlink->h > INT_MAX || (outlink->h * inlink->w) > INT_MAX || -- 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".