Fix for out of bound write memory access in xheaac

am: 2491a07484

Change-Id: I9f2f47d72cbc9a4271adb152164f3ea72b634f59
This commit is contained in:
Ramesh Katuri 2018-09-05 12:45:06 -07:00 committed by android-build-merger
commit 3a3f02636d
2 changed files with 2 additions and 1 deletions

View file

@ -108,6 +108,7 @@
#define MAX_SHORT_WINDOWS 8
#define MAX_NUM_CHANNELS 6
#define MAX_NUM_CHANNELS_USAC_LVL2 2
#define SFB_NUM_MAX ((NSFB_SHORT + 1) * MAX_SHORT_IN_LONG_BLOCK)

View file

@ -316,7 +316,7 @@ WORD32 ixheaacd_usac_process(ia_dec_data_struct *pstr_dec_data,
nr_core_coder_channels = 1;
core_data_extracting:
if (ch_offset >= MAX_NUM_CHANNELS) return -1;
if (ch_offset >= MAX_NUM_CHANNELS_USAC_LVL2) return -1;
err = ixheaacd_core_coder_data(ele_id, pstr_usac_data, elem_idx,
&ch_offset, it_bit_buff,
nr_core_coder_channels);