OSDN Git Service
(root)
/
android-x86
/
packages-apps-Gallery2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5558f22
)
Gallery2: Fix use of uninitialized stack variables
author
Greg Kaiser
<gkaiser@google.com>
Mon, 14 Mar 2016 18:59:52 +0000
(11:59 -0700)
committer
Greg Kaiser
<gkaiser@google.com>
Mon, 14 Mar 2016 18:59:52 +0000
(11:59 -0700)
In estmateWhiteBox(), we were adding up several variables,
but never initialized them to zero.
Change-Id: Ia77d92faa5150da0a1d7a04839729febefa63f74
jni/filters/wbalance.c
patch
|
blob
|
history
diff --git
a/jni/filters/wbalance.c
b/jni/filters/wbalance.c
index
2b92b99
..
7592a42
100644
(file)
--- a/
jni/filters/wbalance.c
+++ b/
jni/filters/wbalance.c
@@
-99,10
+99,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;