aboutsummaryrefslogtreecommitdiffstats
path: root/libSACdec/src/sac_bitdec.cpp
diff options
context:
space:
mode:
authorMartin Storsjo <martin@martin.st>2019-10-08 14:53:07 +0300
committerMartin Storsjo <martin@martin.st>2019-10-08 14:53:07 +0300
commite365f4f27802954f0cf65d3e2eac88b7fdebc83c (patch)
treed0ef656126c0ad2758164a0cf04136efccfe14c1 /libSACdec/src/sac_bitdec.cpp
parentd387d3b6ed79ff9a82c60440bdd86e6e5e324bec (diff)
parentd929f68a05f5cbdd812dca287c8115a39439acf1 (diff)
downloadfdk-aac-e365f4f27802954f0cf65d3e2eac88b7fdebc83c.tar.gz
fdk-aac-e365f4f27802954f0cf65d3e2eac88b7fdebc83c.tar.bz2
fdk-aac-e365f4f27802954f0cf65d3e2eac88b7fdebc83c.zip
Merge remote-tracking branch 'aosp/master'
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];