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 282644B58A for ; Mon, 8 Jul 2024 22:24:48 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0CA8768DCAE; Tue, 9 Jul 2024 01:24:27 +0300 (EEST) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6888E68DC13 for ; Tue, 9 Jul 2024 01:24:16 +0300 (EEST) Received: by mail.gandi.net (Postfix) with ESMTPSA id C6A87FF802 for ; Mon, 8 Jul 2024 22:24:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1720477455; 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=Fa55Hc43RH8T10FtPumNhRpSmWqY2OWo5C6FIZqibdo=; b=DqnoOHMOpN9UQr7nXKuhqlsjlngD8HPDbTFphA60MsFnLBvtZfihUEygcL61XusmdVjMJ+ RcsfpVzlb49jO2vzC9HrtlPxw1NKAp33DwjhEZRCE+OrFFD92pNsdZTtQU5gW6arFLPhL0 b+KJsOcqnaLAiyGnLuGX7uW7hDjJfmSFme0DY/t+gOD0mptHNtQe/CUwtkF8d36chEBlqf 4lqT7tIegLd3R8Ddvny7FlmIQaq7yWYGx0+Fsww8rbeix1x261tmhN2IFf/+TWm3QTIUiL QJViC94bJdan3nsOXJNy9NL1h4SlGyY6wMCP3VV+hvyOU6gS9zY4G7KedVUPig== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Tue, 9 Jul 2024 00:24:06 +0200 Message-ID: <20240708222410.773456-4-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 4/8] avfilter/vf_neighbor_opencl: Use AV_PIX_MAX_PLANES 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: Fix/Robustness/whatever: CID1439575 Out-of-bounds read Sponsored-by: Sovereign Tech Fund Signed-off-by: Michael Niedermayer --- libavfilter/vf_neighbor_opencl.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libavfilter/vf_neighbor_opencl.c b/libavfilter/vf_neighbor_opencl.c index b2939f841a2..ba661bd665e 100644 --- a/libavfilter/vf_neighbor_opencl.c +++ b/libavfilter/vf_neighbor_opencl.c @@ -42,7 +42,7 @@ typedef struct NeighborOpenCLContext { char *matrix_str[4]; - cl_float threshold[4]; + cl_float threshold[AV_VIDEO_MAX_PLANES]; cl_int coordinates; cl_mem coord; @@ -93,7 +93,7 @@ static int neighbor_opencl_make_filter_params(AVFilterContext *avctx) cl_int cle; int i; - for (i = 0; i < 4; i++) { + for (i = 0; i < AV_VIDEO_MAX_PLANES; i++) { ctx->threshold[i] /= 255.0; } -- 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".