summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWei Jia <wjia@google.com>2017-02-13 22:52:28 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-02-13 22:52:28 +0000
commit05b80e373b604c659edda39dc099ca31eba35977 (patch)
tree519fbea294628c8feb748aff9bd2d8d6f12576b4
parentc96ae6403cd84e73138503fa6ee8f1356f639d61 (diff)
parentade762e1c4af287a37e0d214e3cd394fa7f3b4f9 (diff)
downloadandroid_external_sonivox-05b80e373b604c659edda39dc099ca31eba35977.tar.gz
android_external_sonivox-05b80e373b604c659edda39dc099ca31eba35977.tar.bz2
android_external_sonivox-05b80e373b604c659edda39dc099ca31eba35977.zip
Merge "eas_mdls: fix OOB read." into klp-dev am: 008d81708e am: c596af8816
am: ade762e1c4 Change-Id: Ife91bd4547ae1e1851aeeba76409338a6215521b
-rw-r--r--arm-wt-22k/lib_src/eas_mdls.c7
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;