From 1a90fbe0501fbc5f098e51c9b84c8c6830ba3ae2 Mon Sep 17 00:00:00 2001 From: Tommy Vaillancourt Date: Tue, 16 Dec 2025 10:46:24 -0500 Subject: [PATCH 1/2] fix for 2268, preventing pointer outside array in iFFT --- lib_com/ifft_rel.c | 7 ++++++- lib_com/options.h | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lib_com/ifft_rel.c b/lib_com/ifft_rel.c index bda95ec0b1..ffb19976d3 100644 --- a/lib_com/ifft_rel.c +++ b/lib_com/ifft_rel.c @@ -130,7 +130,12 @@ void ifft_rel( id = 4 * id; } step = N_MAX_FFT / n2; - +#ifdef FIX_2268_OOB_INDEXING_IN_IFFT + if( n8 < 2 ) + { + continue; + } +#endif s = sincos_t_ext + step; c = s + N_MAX_FFT / 4; s3 = sincos_t_ext + 3 * step; diff --git a/lib_com/options.h b/lib_com/options.h index fb505d58f4..47fef951b3 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -170,6 +170,7 @@ #define FIX_2274_OOB_INDEXING_IN_CORRMATRIX /* FhG: fix OOB indexing complaint */ #define FIX_2278_OOB_INDEXING_IN_CLOSED_LOOP_PIT_SEARCH /* FhG: fix oob indexing USAN complaint */ #define FIX_2287_MCT_MDCT_STEREO_DATA_MALLOC_SIZE /* FhG: correct allocation size for STEREO_MDCT_DEC_DATA struct */ +#define FIX_2268_OOB_INDEXING_IN_IFFT /* VA: Fix for issue 2268, to silence clang18 */ /* #################### End BE switches ################################## */ -- GitLab From f62bd1305878c118c27a4b60d19cd119ed9f8032 Mon Sep 17 00:00:00 2001 From: Tommy Vaillancourt Date: Tue, 16 Dec 2025 11:34:17 -0500 Subject: [PATCH 2/2] fix clang --- lib_com/ifft_rel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_com/ifft_rel.c b/lib_com/ifft_rel.c index ffb19976d3..f2d07669c7 100644 --- a/lib_com/ifft_rel.c +++ b/lib_com/ifft_rel.c @@ -131,7 +131,7 @@ void ifft_rel( } step = N_MAX_FFT / n2; #ifdef FIX_2268_OOB_INDEXING_IN_IFFT - if( n8 < 2 ) + if ( n8 < 2 ) { continue; } -- GitLab