Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ebce1308 authored by Greg Kaiser's avatar Greg Kaiser Committed by Arne Coucheron
Browse files

Gallery2: Fix use of uninitialized stack variables

In estmateWhiteBox(), we were adding up several variables,
but never initialized them to zero.

Change-Id: Ia77d92faa5150da0a1d7a04839729febefa63f74
parent 1fbe3429
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -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;