diff options
author | Rajat Kumar <rajat.kumar@ittiam.com> | 2020-09-01 10:29:12 +0530 |
---|---|---|
committer | rajat.kumar@ittiam.com <rajat.kumar@ittiam.com> | 2020-10-05 22:57:31 +0530 |
commit | 6398ab8de5856135ee621d41bba4a4ed55b96fb7 (patch) | |
tree | 1962281cba1f3473860645ee8bfb4d32ddb37524 | |
parent | e5c5475c98b9ee6f2f6160fab78e2f6cca5640b9 (diff) | |
download | libxaac-6398ab8de5856135ee621d41bba4a4ed55b96fb7.tar.gz |
Fix for infinite loop in drc selection process
DRC should not permit the configurations that
exceed the total supported complexity.
Bug: 167279883
Test: poc in bug
Change-Id: Icffa42cdcd9184d434b7a0bfa1b11ebd5ec4af71
-rw-r--r-- | decoder/drc_src/impd_drc_selection_process.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/decoder/drc_src/impd_drc_selection_process.c b/decoder/drc_src/impd_drc_selection_process.c index fa84ff1..0917845 100644 --- a/decoder/drc_src/impd_drc_selection_process.c +++ b/decoder/drc_src/impd_drc_selection_process.c @@ -997,6 +997,10 @@ WORD32 impd_manage_complexity(ia_drc_sel_pro_struct* pstr_drc_uni_sel_proc, complexityDrcTotal *= freqNorm; complexityEqTotal *= freqNorm; + if ((complexityDrcTotal > complexitySupportedTotal) || + (complexityEqTotal > complexitySupportedTotal)) + return UNEXPECTED_ERROR; + if (numBandsTooLarge == 1) { if (pstr_drc_uni_sel_proc->uni_drc_sel_proc_output.sel_drc_set_ids[0] > 0) { err = impd_find_drc_instructions_uni_drc( |