Merge "Fix for stack overflow in eq selection in drc module" into pi-dev

This commit is contained in:
TreeHugger Robot 2018-10-29 20:43:22 +00:00 committed by Android (Google) Code Review
commit 09cc55d5fa
2 changed files with 3 additions and 0 deletions

View file

@ -86,6 +86,8 @@ extern "C" {
#define SELECTION_CANDIDATE_COUNT_MAX 32
#define MAX_NUM_COMPRESSION_EQ (16)
#define PROC_COMPLETE 1
#define UNEXPECTED_ERROR 2
#define PARAM_ERROR 3

View file

@ -640,6 +640,7 @@ WORD32 impd_find_eq_set_no_compression(ia_drc_config* pstr_drc_config,
for (c = 0; c < str_eq_instructions->drc_set_id_count; c++) {
if ((str_eq_instructions->drc_set_id[c] == ID_FOR_ANY_DRC) ||
(str_eq_instructions->drc_set_id[c] == 0)) {
if (k >= MAX_NUM_COMPRESSION_EQ) return UNEXPECTED_ERROR;
num_compression_eq_id[k] = str_eq_instructions->eq_set_id;
k++;
}