Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
Merge "eas_mdls: fix OOB read." into klp-dev am: 008d817 am: c596af8
Browse files Browse the repository at this point in the history
…am: ade762e am: 05b80e3 am: 944bffb

am: f5d1ed4

Change-Id: Ic2d6ff5789b28992ed73c03a05fddec73ac04e85
  • Loading branch information
Wei Jia authored and android-build-merger committed Feb 13, 2017
2 parents 7881d83 + f5d1ed4 commit 41cdf3c
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion arm-wt-22k/lib_src/eas_mdls.c
Expand Up @@ -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"
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 41cdf3c

Please sign in to comment.