From 89e02e5eb0c3d60103df0a265c987426ecd5ae51 Mon Sep 17 00:00:00 2001 From: Keith Mok Date: Tue, 10 Nov 2015 16:52:05 -0800 Subject: Fix memory corruption in SpotShadow The array list is too small and causing stack corruption Change-Id: I0e34dad39357fb63977d2ce6f183ced7b6a632be --- libs/hwui/SpotShadow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/hwui') diff --git a/libs/hwui/SpotShadow.cpp b/libs/hwui/SpotShadow.cpp index b8c9804..3186a8e 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 -- cgit v1.1