From a1f563134065abb360096cc06f6bfe4a8cca7a48 Mon Sep 17 00:00:00 2001 From: Keith Mok Date: Tue, 10 Nov 2015 16:52:05 -0800 Subject: [PATCH] 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(-) diff --git a/libs/hwui/SpotShadow.cpp b/libs/hwui/SpotShadow.cpp index b8c98041a6bf8..3186a8e9735e7 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