aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajat Kumar <rajat.kumar@ittiam.com>2020-10-06 20:15:58 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-10-06 20:15:58 +0000
commit1eaddc69d3c819e574a111e98cd1bbf09db799d8 (patch)
tree1962281cba1f3473860645ee8bfb4d32ddb37524
parentf901ed5fe7e55b1321d080e03e105c9f4d954de9 (diff)
parentc8a90c8a1fe266262ef51878e478ae964dd0c86a (diff)
downloadlibxaac-1eaddc69d3c819e574a111e98cd1bbf09db799d8.tar.gz
Fix for infinite loop in drc selection process am: 6398ab8de5 am: 6bb106faaa am: c8a90c8a1f
Original change: https://android-review.googlesource.com/c/platform/external/libxaac/+/1440592 Change-Id: I7535dd2d17210ce9bb000609fd2e8bdd7d534d94
-rw-r--r--decoder/drc_src/impd_drc_selection_process.c4
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(