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 33FA146FF2 for ; Sun, 24 Dec 2023 23:26:42 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 5B69968D169; Mon, 25 Dec 2023 01:26:33 +0200 (EET) 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 AC06D68D083 for ; Mon, 25 Dec 2023 01:26:26 +0200 (EET) Received: by mail.gandi.net (Postfix) with ESMTPSA id 0AFB1FF803 for ; Sun, 24 Dec 2023 23:26:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=niedermayer.cc; s=gm1; t=1703460386; 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=0LLrb/3KRrz3FOO8BuAM3PVmTiOUd9Z7TfhQF+gtD6Y=; b=F1XaG/qm/jheIqNFLAbJYN5ZE18Gub8Vcji3YF3SL76xZ5RdCUlo1Pme3u6LaB3qj/Rrp1 fqnkZfobV1bCJ+Ufsdsjnpr37VUUXPOzqlGYRzEIJBNCLYltQtLvU+DLJeYKldMjRKdDQ+ x7KsfF0E/J1jtmnmIFlE91CulnbXa2TyrWidTL7BhsxT5zG905INdFiJTDBEJIeuAVBP5N x3BYm2xSC9Lyyb0zq/Lu43kTaDoyHa8JZ3hfN5+pd2w2x1Si02D82dc/AI3rxbDSzgwSdr aTbZE8QKEtPp8nYhD96r7qxi5vUcHTp/F6eahY7RgjNOPAHbxR6ZC/h/+iXO6g== From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 25 Dec 2023 00:26:22 +0100 Message-Id: <20231224232624.30355-2-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 2/4] avfilter/avf_showspectrum: fix off by 1 error 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/10749/poc15ffmpeg Regression since: 81df787b53eb5c6433731f6eaaf7f2a94d8a8c80 Found-by: Zeng Yunxiang Signed-off-by: Michael Niedermayer --- libavfilter/avf_showspectrum.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/avf_showspectrum.c b/libavfilter/avf_showspectrum.c index 8cf73fce705..99a5c33d091 100644 --- a/libavfilter/avf_showspectrum.c +++ b/libavfilter/avf_showspectrum.c @@ -1784,7 +1784,7 @@ static int showspectrumpic_request_frame(AVFilterLink *outlink) int acc_samples = 0; int dst_offset = 0; - while (nb_frame <= s->nb_frames) { + while (nb_frame < s->nb_frames) { AVFrame *cur_frame = s->frames[nb_frame]; int cur_frame_samples = cur_frame->nb_samples; int nb_samples = 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".