From b45cc9297e567f76ccd39d9670eed521f2036d2c Mon Sep 17 00:00:00 2001
From: happyworker <208suo@208suo.com>
Date: Wed, 18 Sep 2024 15:24:00 +0800
Subject: [PATCH] createpatch

---
 libavfilter/asrc_afirsrc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavfilter/asrc_afirsrc.c b/libavfilter/asrc_afirsrc.c
index e2359c1..ea04c35 100644
--- a/libavfilter/asrc_afirsrc.c
+++ b/libavfilter/asrc_afirsrc.c
@@ -480,7 +480,7 @@ static av_cold int config_eq_output(AVFilterLink *outlink)
         if (ret < 0)
             return ret;
 
-        s->magnitude = av_calloc(s->nb_magnitude, sizeof(*s->magnitude));
+        s->magnitude = av_calloc(s->nb_magnitude + 1, sizeof(*s->magnitude));
         if (!s->magnitude)
             return AVERROR(ENOMEM);
         memcpy(s->magnitude, eq_presets[s->preset].gains, sizeof(*s->magnitude) * s->nb_magnitude);
-- 
2.27.0

