aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajat Kumar <rajat.kumar@ittiam.com>2020-10-06 19:56:48 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2020-10-06 19:56:48 +0000
commitc8a90c8a1fe266262ef51878e478ae964dd0c86a (patch)
tree1962281cba1f3473860645ee8bfb4d32ddb37524
parent207c438c0c52a1800ac0aad73e1e8b529cbf5d20 (diff)
parent6bb106faaae4a5053ead925fb0cc40c041c9e267 (diff)
downloadlibxaac-c8a90c8a1fe266262ef51878e478ae964dd0c86a.tar.gz
Fix for infinite loop in drc selection process am: 6398ab8de5 am: 6bb106faaa
Original change: https://android-review.googlesource.com/c/platform/external/libxaac/+/1440592 Change-Id: I4bfb702333a3b391bd49d1bc56359cef9aed27cf
-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(