summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Keith Mok <ek9852@gmail.com> 2015-11-10 16:52:05 -0800
committer Keith Mok <ek9852@gmail.com> 2015-11-11 08:49:20 -0800
commita1f563134065abb360096cc06f6bfe4a8cca7a48 (patch)
tree1c446d5cb08cb43867d5ec2ea777d14883982555
parent37bf3ec9d2fb3dfdccfe043e51723e4e543f0703 (diff)
Fix memory corruption in SpotShadow
The array list is too small and causing stack corruption Change-Id: I0e34dad39357fb63977d2ce6f183ced7b6a632be
-rw-r--r--libs/hwui/SpotShadow.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/hwui/SpotShadow.cpp b/libs/hwui/SpotShadow.cpp
index b8c98041a6bf..3186a8e9735e 100644
--- a/libs/hwui/SpotShadow.cpp
+++ b/libs/hwui/SpotShadow.cpp
@@ -742,7 +742,7 @@ inline void genNewPenumbraAndPairWithUmbra(const Vector2* penumbra, int penumbra
// vertex's location.
int newPenumbraNumber = indexDelta - 1;
- float accumulatedDeltaLength[newPenumbraNumber];
+ float accumulatedDeltaLength[indexDelta];
float totalDeltaLength = 0;
// To save time, cache the previous umbra vertex info outside the loop