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