From 9b16033d61f35e53d85bc7665cac359781fefd99 Mon Sep 17 00:00:00 2001 From: ShashankPathmudi <146080254+ShashankPathmudi@users.noreply.github.com> Date: Thu, 16 May 2024 09:28:38 +0530 Subject: [PATCH] Initialize local scratch structure before first use in non-USAC control paths (#89) Significance: -------------- - Possibility of accessing uninitialized access to structure members of a local scratch structure uncovered with fuzzer testing. - The changes in this commit handle such cases. Bug: ossFuzz:68464 Test: poc in bug --- decoder/ixheaacd_api.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/decoder/ixheaacd_api.c b/decoder/ixheaacd_api.c index 0be484f..1608968 100644 --- a/decoder/ixheaacd_api.c +++ b/decoder/ixheaacd_api.c @@ -3184,6 +3184,8 @@ IA_ERRORCODE ixheaacd_dec_execute( { WORD element_index_order1[MAX_BS_ELEMENT]; ia_aac_dec_scratch_struct aac_scratch_struct; + memset(&aac_scratch_struct, 0, sizeof(aac_scratch_struct)); + ixheaacd_allocate_aac_scr( &aac_scratch_struct, p_state_enhaacplus_dec->aac_scratch_mem_v, time_data, channel, p_obj_exhaacplus_dec->aac_config.ui_max_channels,