diff options
author | Wei Jia <wjia@google.com> | 2017-02-13 23:09:36 +0000 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2017-02-13 23:09:36 +0000 |
commit | 984b9498277cd03a1fb00f3ca787a6cfaa055318 (patch) | |
tree | b9fc32388cf15ac805689fa7ce0ff568bb12c05e | |
parent | e684ba6f6f28326d0ec68326bcc9a859aa5c5043 (diff) | |
parent | 92a5d3f33b0aa247164ae8ffee8a889616f11cf1 (diff) | |
download | android_external_sonivox-984b9498277cd03a1fb00f3ca787a6cfaa055318.tar.gz android_external_sonivox-984b9498277cd03a1fb00f3ca787a6cfaa055318.tar.bz2 android_external_sonivox-984b9498277cd03a1fb00f3ca787a6cfaa055318.zip |
Merge "eas_mdls: fix OOB read." into klp-dev am: 008d81708e am: c596af8816 am: ade762e1c4 am: 05b80e373b am: 944bffbd15 am: f5d1ed4a9c am: 41cdf3c775 am: 1efd33c341
am: 92a5d3f33b
Change-Id: I863dd8c5306704aacbaa3cd234fcda16b3eb4d6c
-rw-r--r-- | arm-wt-22k/lib_src/eas_mdls.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arm-wt-22k/lib_src/eas_mdls.c b/arm-wt-22k/lib_src/eas_mdls.c index e2cb688..296d783 100644 --- a/arm-wt-22k/lib_src/eas_mdls.c +++ b/arm-wt-22k/lib_src/eas_mdls.c @@ -114,6 +114,8 @@ /* this define allows us to use the sndlib.h structures as RW memory */ #define SCNST +#include "log/log.h" + #include "eas_data.h" #include "eas_host.h" #include "eas_mdls.h" @@ -2086,8 +2088,11 @@ static EAS_RESULT PushcdlStack (EAS_U32 *pStack, EAS_INT *pStackPtr, EAS_U32 val { /* stack overflow, return an error */ - if (*pStackPtr >= CDL_STACK_SIZE) + if (*pStackPtr >= (CDL_STACK_SIZE - 1)) { + ALOGE("b/34031018, stackPtr(%d)", *pStackPtr); + android_errorWriteLog(0x534e4554, "34031018"); return EAS_ERROR_FILE_FORMAT; + } /* push the value onto the stack */ *pStackPtr = *pStackPtr + 1; |