aboutsummaryrefslogtreecommitdiffstats
path: root/libSACdec/src/sac_bitdec.cpp
diff options
context:
space:
mode:
authorXin Li <delphij@google.com>2019-07-01 20:59:18 +0000
committerXin Li <delphij@google.com>2019-07-01 20:59:18 +0000
commit4d56b880e2d129757bd0855859da83cad0399965 (patch)
treefa62c4f58bc140ba5c0a27e2c913d3ea0a5bfe98 /libSACdec/src/sac_bitdec.cpp
parentc10b5daa8da7e059eeaebbe7ac22c9635a6af26d (diff)
parent058d1295f4d9e3418eafb1fd7c92602000ff5c53 (diff)
downloadfdk-aac-4d56b880e2d129757bd0855859da83cad0399965.tar.gz
fdk-aac-4d56b880e2d129757bd0855859da83cad0399965.tar.bz2
fdk-aac-4d56b880e2d129757bd0855859da83cad0399965.zip
DO NOT MERGE - Merge qt-dev-plus-aosp-without-vendor (5699924) into stage-aosp-master
Bug: 134405016 Change-Id: I30ab93ed5c2fa3c47306058d1a0f749b8101b01e
Diffstat (limited to 'libSACdec/src/sac_bitdec.cpp')
-rw-r--r--libSACdec/src/sac_bitdec.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/libSACdec/src/sac_bitdec.cpp b/libSACdec/src/sac_bitdec.cpp
index 883e1e8..a1bdca4 100644
--- a/libSACdec/src/sac_bitdec.cpp
+++ b/libSACdec/src/sac_bitdec.cpp
@@ -1457,7 +1457,7 @@ static SACDEC_ERROR mapIndexData(
FIXP_DBL (*pOttVsTotDb1)[MAX_PARAMETER_SETS][MAX_PARAMETER_BANDS],
FIXP_DBL (*pOttVsTotDb2)[MAX_PARAMETER_SETS][MAX_PARAMETER_BANDS]) {
int aParamSlots[MAX_PARAMETER_SETS];
- int aInterpolate[MAX_PARAMETER_SETS];
+ int aInterpolate[MAX_PARAMETER_SETS] = {0};
int dataSets;
int aMap[MAX_PARAMETER_BANDS + 1];
@@ -1562,6 +1562,7 @@ static SACDEC_ERROR mapIndexData(
i2 = i;
while (aInterpolate[i2] == 1) {
i2++;
+ if (i2 >= MAX_PARAMETER_SETS) return MPS_WRONG_PARAMETERSETS;
}
x1 = paramSlot[i1];
xi = paramSlot[i];