diff options
author | Greg Kaiser <gkaiser@google.com> | 2016-03-14 11:59:52 -0700 |
---|---|---|
committer | Arne Coucheron <arco68@gmail.com> | 2017-12-16 06:52:30 +0100 |
commit | 5ed4a2c5c42a11db625c4fcf26810ae0f9e77f50 (patch) | |
tree | 181b4b29a0d20d7aa44c02eac07e11c6166c488e | |
parent | 59865f079e1661ae16d46b3335b6439b495d43af (diff) | |
download | android_packages_apps_Gallery2-5ed4a2c5c42a11db625c4fcf26810ae0f9e77f50.tar.gz android_packages_apps_Gallery2-5ed4a2c5c42a11db625c4fcf26810ae0f9e77f50.tar.bz2 android_packages_apps_Gallery2-5ed4a2c5c42a11db625c4fcf26810ae0f9e77f50.zip |
Gallery2: Fix use of uninitialized stack variables
In estmateWhiteBox(), we were adding up several variables,
but never initialized them to zero.
Change-Id: Ia77d92faa5150da0a1d7a04839729febefa63f74
-rw-r--r-- | jni/filters/wbalance.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/jni/filters/wbalance.c b/jni/filters/wbalance.c index 9a2156166..99a7d2e0d 100644 --- a/jni/filters/wbalance.c +++ b/jni/filters/wbalance.c @@ -101,10 +101,10 @@ void estmateWhite(unsigned char *src, int len, int *wr, int *wb, int *wg){ } void estmateWhiteBox(unsigned char *src, int iw, int ih, int x,int y, int *wr, int *wb, int *wg){ - int r; - int g; - int b; - int sum; + int r = 0; + int g = 0; + int b = 0; + int sum = 0; int xp,yp; int bounds = 5; if (x<0) x = bounds; |