Fix for stack overflow in eq selection in drc module

Bug:114735603
Test: vendor
Change-Id: I83be3dfe1111caa1acd244b0a9ba2a8944c92981
This commit is contained in:
Ramesh Katuri 2018-09-20 19:02:29 +05:30 committed by Ray Essick
parent 988f5bd17c
commit c26e43d759
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++;
}