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 AE1D9432B6 for ; Fri, 22 Dec 2023 21:45:36 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id E239168D318; Fri, 22 Dec 2023 23:45:13 +0200 (EET) 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 AFC4D68D2EF for ; Fri, 22 Dec 2023 23:45:06 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id DF3FB1BF203 for ; Fri, 22 Dec 2023 21:45:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1703281506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:in-reply-to:in-reply-to:references:references; bh=lbsAlBQxxzoAX6Ej9VeoCnebSzciA1MemAS2T7Gr+9A=; b=EVVGFjue2q0KlTTiPKVSYrrC5mopD+g5LVTYGbtW6zuhuVZgA0miEQ0/WF+vA0DIfW2JPF wX78eswACM2YBRB4XlvHMAliu9aJb/jNhp9SFhyLTUEqNfWuTK/C6zYzFqzqCdvYpcSfeA UbY+TEpA7Pw6M2EwizwmUvo5qgqWCfUeKa0bLVmDcyEX2lRM2v17/WZjv2MdJI3peqj/lu Ol+x3F3bjEzHY7n/ACtzuaVrcYYVb9IL1akCLy59pgs+Io557vXbt8wm9VTuxZu43+29FQ 7NsOEyQmaQhbJpS+Bahlcee9Dt/Aua7NTPQEfUyPq0i0M7M056pXaex++EtTmA== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Fri, 22 Dec 2023 22:45:02 +0100 Message-Id: <20231222214502.24596-4-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231222214502.24596-1-michael@niedermayer.cc> References: <20231222214502.24596-1-michael@niedermayer.cc> X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 4/4] avfilter/vf_swaprect: round coordinates down 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 MIME-Version: 1.0 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: out of array access: Fixes: tickets/10745/poc12ffmpeg Found-by: Li Zeyuan and Zeng Yunxiang. Signed-off-by: Michael Niedermayer --- libavfilter/vf_swaprect.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/libavfilter/vf_swaprect.c b/libavfilter/vf_swaprect.c index 20d8e233e45..119fd692fa7 100644 --- a/libavfilter/vf_swaprect.c +++ b/libavfilter/vf_swaprect.c @@ -173,14 +173,14 @@ FF_ENABLE_DEPRECATION_WARNINGS lw[1] = lw[2] = AV_CEIL_RSHIFT(inlink->w, s->desc->log2_chroma_w); lw[0] = lw[3] = inlink->w; - x1[1] = x1[2] = AV_CEIL_RSHIFT(x1[0], s->desc->log2_chroma_w); + x1[1] = x1[2] = (x1[0] >> s->desc->log2_chroma_w); x1[0] = x1[3] = x1[0]; - y1[1] = y1[2] = AV_CEIL_RSHIFT(y1[0], s->desc->log2_chroma_h); + y1[1] = y1[2] = (y1[0] >> s->desc->log2_chroma_h); y1[0] = y1[3] = y1[0]; - x2[1] = x2[2] = AV_CEIL_RSHIFT(x2[0], s->desc->log2_chroma_w); + x2[1] = x2[2] = (x2[0] >> s->desc->log2_chroma_w); x2[0] = x2[3] = x2[0]; - y2[1] = y2[2] = AV_CEIL_RSHIFT(y2[0], s->desc->log2_chroma_h); + y2[1] = y2[2] = (y2[0] >> s->desc->log2_chroma_h); y2[0] = y2[3] = y2[0]; -- 2.17.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".