From 3438e2e1d0528b55329afe6f7fbfb09393a60777 Mon Sep 17 00:00:00 2001 From: Tommy Vaillancourt Date: Mon, 15 Dec 2025 11:57:16 -0500 Subject: [PATCH 1/2] Fix to prevent copy of uninit data --- lib_com/options.h | 2 +- lib_dec/ivas_core_dec_fx.c | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib_com/options.h b/lib_com/options.h index ee8c6be3a..a3908bde6 100644 --- a/lib_com/options.h +++ b/lib_com/options.h @@ -89,7 +89,7 @@ #define FIX_2252_SCALING_SAVE_HB_SYNTH /* VA: issue 2252: fix use-of-uninit-value in save_hb_synth_fx[] scaling in FOA decoding with bitstream that starts with an SID */ #define FIX_2248_EVS_ASSERT /* VA: Include _sat in an EVS related part of the code */ #define FIX_2254_IMPROV_COMPLEXITY_BE /* VA: BE small complexity reduction */ - +#define FIX_2290_COPY_OF_UNINIT_DATA /* VA: prevent the copy of un-initialized data */ /* #################### End BE switches ################################## */ /* #################### Start NON-BE switches ############################ */ diff --git a/lib_dec/ivas_core_dec_fx.c b/lib_dec/ivas_core_dec_fx.c index 690797e20..c018c19b7 100644 --- a/lib_dec/ivas_core_dec_fx.c +++ b/lib_dec/ivas_core_dec_fx.c @@ -562,8 +562,11 @@ ivas_error ivas_core_dec_fx( hSCE->q_save_hb_synth_fx = Q11; move16(); } - +#ifdef FIX_2290_COPY_OF_UNINIT_DATA + Copy_Scale_sig_16_32_DEPREC( old_syn_12k8_16k_fx_16, old_syn_12k8_16k_fx[n], st->L_frame, Q11 - ( -Q1 ) ); // Q(11 - (-1)) +#else Copy_Scale_sig_16_32_DEPREC( old_syn_12k8_16k_fx_16, old_syn_12k8_16k_fx[n], L_FRAME16k, Q11 - ( -Q1 ) ); // Q(11 - (-1)) +#endif } Copy_Scale_sig_32_16( st->previoussynth_fx_32, st->previoussynth_fx, L_FRAME48k, 0 ); // Q0 -- GitLab From a9f07905f224b85234903e15dee82c068ec3f7a6 Mon Sep 17 00:00:00 2001 From: Tommy Vaillancourt Date: Mon, 15 Dec 2025 16:50:17 -0500 Subject: [PATCH 2/2] Complement to 2290 --- lib_dec/ivas_core_dec_fx.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib_dec/ivas_core_dec_fx.c b/lib_dec/ivas_core_dec_fx.c index c018c19b7..bf1f75333 100644 --- a/lib_dec/ivas_core_dec_fx.c +++ b/lib_dec/ivas_core_dec_fx.c @@ -563,7 +563,10 @@ ivas_error ivas_core_dec_fx( move16(); } #ifdef FIX_2290_COPY_OF_UNINIT_DATA - Copy_Scale_sig_16_32_DEPREC( old_syn_12k8_16k_fx_16, old_syn_12k8_16k_fx[n], st->L_frame, Q11 - ( -Q1 ) ); // Q(11 - (-1)) + IF( st->hBWE_FD != NULL ) + { + Copy_Scale_sig_16_32_DEPREC( old_syn_12k8_16k_fx_16, old_syn_12k8_16k_fx[n], st->L_frame, Q11 - ( -Q1 ) ); // Q(11 - (-1)) + } #else Copy_Scale_sig_16_32_DEPREC( old_syn_12k8_16k_fx_16, old_syn_12k8_16k_fx[n], L_FRAME16k, Q11 - ( -Q1 ) ); // Q(11 - (-1)) #endif -- GitLab