This is an automated email from the git hooks/post-receive script.

Git pushed a commit to branch master
in repository ffmpeg.

commit afa6f9089798fde73dbcabfd26d700a38188505a
Author:     lusoris <[email protected]>
AuthorDate: Thu Oct 15 22:06:36 2026 +0200
Commit:     lusoris <[email protected]>
CommitDate: Thu Oct 15 22:06:36 2026 +0200

    avfilter/af_firequalizer: assert the minimum cepstrum length
    
    GCC 14.4.0 and 16.2.1 report -Wstringop-overflow in minimum-phase kernel
    generation. The trailing buffer clear uses cepstrum_len / 2 - 1 as its
    element count, so lengths below two yield a negative count converted to
    an oversized write length. Assert the minimum length before initializing
    the cepstrum buffers. Kernel calculations for lengths of at least two
    are unchanged.
    
    Signed-off-by: lusoris <[email protected]>
---
 libavfilter/af_firequalizer.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/libavfilter/af_firequalizer.c b/libavfilter/af_firequalizer.c
index 809741218d..15da10e972 100644
--- a/libavfilter/af_firequalizer.c
+++ b/libavfilter/af_firequalizer.c
@@ -542,6 +542,8 @@ static void generate_min_phase_kernel(FIREqualizerContext 
*s, float *rdft_buf)
     double norm = 2.0 / cepstrum_len;
     double minval = 1e-7 / rdft_len;
 
+    av_assert0(cepstrum_len >= 2);
+
     memset(s->cepstrum_buf, 0, cepstrum_len * sizeof(*s->cepstrum_buf));
     memset(s->cepstrum_tbuf, 0, (cepstrum_len + 2) * 
sizeof(*s->cepstrum_tbuf));
     memcpy(s->cepstrum_buf, rdft_buf, rdft_len/2 * sizeof(*rdft_buf));

-- 
To stop receiving notification emails like this one, please contact
[email protected].
_______________________________________________
ffmpeg-cvslog mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to