aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2019-03-08 10:27:16 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2019-03-08 10:27:16 +0000
commitea08af4499b9a722a0a6085aa74929b5741209e7 (patch)
treea89f5694fb05d47ff298e83c895bb7f5f18be7df
parent0309455012f1a39cb37ecfd1c10052118c22b27e (diff)
parent8972e93edd448c378e0cc099a0fbe25b64295a64 (diff)
downloadfdk-aac-ea08af4499b9a722a0a6085aa74929b5741209e7.tar.gz
fdk-aac-ea08af4499b9a722a0a6085aa74929b5741209e7.tar.bz2
fdk-aac-ea08af4499b9a722a0a6085aa74929b5741209e7.zip
Merge "libSBRdec: prevent OOB access"
-rw-r--r--libSBRdec/src/env_extr.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libSBRdec/src/env_extr.cpp b/libSBRdec/src/env_extr.cpp
index c72a7b6..5b7a0b1 100644
--- a/libSBRdec/src/env_extr.cpp
+++ b/libSBRdec/src/env_extr.cpp
@@ -1152,6 +1152,10 @@ static int generateFixFixOnly(FRAME_INFO *hSbrFrameInfo, int tranPosInternal,
int nEnv, i, tranIdx;
const int *pTable;
+ if (tranPosInternal >= numberTimeSlots) {
+ return 0;
+ }
+
switch (numberTimeSlots) {
case 8:
pTable = FDK_sbrDecoder_envelopeTable_8[tranPosInternal];