From a154fc29fc3216833b7d91a5d650ebc281a3a0fb Mon Sep 17 00:00:00 2001 From: Markus Multrus Date: Mon, 26 Jan 2026 13:31:11 +0100 Subject: [PATCH] issue 2352: prevent copying uninitialized values from Aq_fx[][] to Aq_fx_32[][] in TCX --- lib_com/options.h | 1 + lib_dec/ivas_stereo_mdct_core_dec_fx.c | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/lib_com/options.h b/lib_com/options.h index c7cd38dd8..455ba816d 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -107,6 +107,7 @@ #define FIX_2330_CLANG_18_WARNINGS_REND /* FhG: Fix renderer warnings */ #define FIX_BASOP_2350_HARM_0B_BWE /* VA: basop issue 2350: harmonization of the 0b BWE */ #define FIX_2349_HARM_FIND_UV /* VA: basop issue 2349: harmonization of find_uv() function */ +#define FIX_2352_COPY_AQ_IN_TCX /* FhG: basop issue 2352: prevent copying uninitialized values from Aq_fx[][] to Aq_fx_32[][] in TCX */ /* #################### End BE switches ################################## */ diff --git a/lib_dec/ivas_stereo_mdct_core_dec_fx.c b/lib_dec/ivas_stereo_mdct_core_dec_fx.c index c1dc964af..118baa38b 100644 --- a/lib_dec/ivas_stereo_mdct_core_dec_fx.c +++ b/lib_dec/ivas_stereo_mdct_core_dec_fx.c @@ -371,9 +371,17 @@ void stereo_mdct_core_dec_fx( } } +#ifdef FIX_2352_COPY_AQ_IN_TCX + FOR( ch = 0; ch < nChannels; ch++ ) +#else FOR( ch = 0; ch < CPE_CHANNELS; ch++ ) +#endif { +#ifdef FIX_2352_COPY_AQ_IN_TCX + Copy_Scale_sig_16_32_DEPREC( Aq_fx[ch], Aq_fx_32[ch], nSubframes[ch] * M, sub( Q16, Q12 ) ); /* Q16 */ +#else Copy_Scale_sig_16_32_DEPREC( Aq_fx[ch], Aq_fx_32[ch], ( NB_SUBFR16k + 1 ) * ( M + 1 ), sub( Q16, Q12 ) ); /* Q16 */ +#endif } /*--------------------------------------------------------------------------------* -- GitLab