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 8824840841 for ; Sun, 24 Dec 2023 23:26:57 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id AA14F68D184; Mon, 25 Dec 2023 01:26:36 +0200 (EET) Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 46BE668D164 for ; Mon, 25 Dec 2023 01:26:28 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id 961C71C0004; Sun, 24 Dec 2023 23:26:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1703460387; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:in-reply-to:in-reply-to:references:references; bh=VuaEFVgODJPfSk7toW2q3t+ipIln9/LHdomYy5wNa9U=; b=fAPV9ifoRhZlxSWvSKqUXLc2QD9qlWkbtykYzCnmmmSKBdTVdnYXPBCr9xX4AswAQwT3mR +QO0OoWQqvAozKlxwJ1l6sF4ixx7loTFYoMRjYIwjcNaCZMqrR5hktDEOleEH83c4nHsmz Yw0ab8oNCHywXgVrfS17lwxcEk7LgjdJWugLBIr3VfswSN60UaYTgobQ2ZVPj4uuWPLiRE XYd0RTsF2deoZXUwOckaewIFvbCvp4QMKk/VEqSRHo9w5VOPi7bjIPfthVAzxl9O3A1SEc 0QnpcJpZn7MYi5cwSPQz8roVgj1RUETqgktxT6iH1agK4bTzWtz6seSxXyRjRA== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 25 Dec 2023 00:26:24 +0100 Message-Id: <20231224232624.30355-4-michael@niedermayer.cc> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20231224232624.30355-1-michael@niedermayer.cc> References: <20231224232624.30355-1-michael@niedermayer.cc> X-GND-Sasl: michael@niedermayer.cc Subject: [FFmpeg-devel] [PATCH 4/4] avfilter/af_stereotools: round-up max size of buffer 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 Cc: Paul B Mahol 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: From: Paul B Mahol Fixes: out of array access Fixes: tickets/10747/poc14ffmpeg Found-by: Zeng Yunxiang and Song Jiaxuan Signed-off-by: Michael Niedermayer --- libavfilter/af_stereotools.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/af_stereotools.c b/libavfilter/af_stereotools.c index 4bcd696cf90..915edecc539 100644 --- a/libavfilter/af_stereotools.c +++ b/libavfilter/af_stereotools.c @@ -119,7 +119,7 @@ static int config_input(AVFilterLink *inlink) AVFilterContext *ctx = inlink->dst; StereoToolsContext *s = ctx->priv; - s->length = FFALIGN(inlink->sample_rate / 10, 2); + s->length = FFALIGN((inlink->sample_rate + 9) / 10, 2); if (!s->buffer) s->buffer = av_calloc(s->length, sizeof(*s->buffer)); if (!s->buffer) -- 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".