aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorakshayragir833 <110660198+akshayragir833@users.noreply.github.com>2024-01-02 19:07:05 +0530
committerGitHub <noreply@github.com>2024-01-02 19:07:05 +0530
commit87f206b42d71fbf1c5601ce6679d22d0777e79bb (patch)
treed745b6aa9317dc4187c83906efb7e22e29d8d016
parent59ab6ada33b59f40b385a229298b40cc6f903db5 (diff)
downloadlibxaac-87f206b42d71fbf1c5601ce6679d22d0777e79bb.tar.gz
Fix for the Use-of-uninitialized-value in ixheaace_frame_info_generator (#75)
These changes handle the runtime error reported by preventing the inappropriate access of uninitialized member from a structure. Bug: ossFuzz: 65422 Test: poc in bug
-rw-r--r--encoder/ixheaace_sbr_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/encoder/ixheaace_sbr_main.c b/encoder/ixheaace_sbr_main.c
index a708db2..ba8fd00 100644
--- a/encoder/ixheaace_sbr_main.c
+++ b/encoder/ixheaace_sbr_main.c
@@ -503,7 +503,7 @@ VOID ixheaace_adjust_sbr_settings(const ixheaace_pstr_sbr_cfg pstr_config, UWORD
break;
}
}
- pstr_config->use_low_freq_res = 0;
+
if (pstr_config->sbr_codec == ELD_SBR) {
pstr_config->send_header_data_time = -1;
if ((num_ch == NUM_CHANS_MONO) && (bit_rate <= 22000)) {
@@ -581,6 +581,7 @@ VOID ixheaace_initialize_sbr_defaults(ixheaace_pstr_sbr_cfg pstr_config) {
pstr_config->sbr_pvc_active = 0;
pstr_config->sbr_harmonic = 0;
pstr_config->sbr_ratio_idx = 0; // NO_SBR
+ pstr_config->use_low_freq_res = 0;
}
static IA_ERRORCODE ia_enhaacplus_enc_update_freq_band_tab(