From: Kovarththanan Rajaratnam Date: Thu, 18 Mar 2010 11:41:13 +0000 (+0100) Subject: Let the compiler zero initialiase all the members X-Git-Tag: v3.0pre1~86^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bb8820db3abe2ad2d9e7a9f1e34238d9ed21a71f;p=thirdparty%2Fccache.git Let the compiler zero initialiase all the members --- diff --git a/mdfour.c b/mdfour.c index f156153c1..dba49fcec 100644 --- a/mdfour.c +++ b/mdfour.c @@ -112,7 +112,7 @@ void mdfour_begin(struct mdfour *md) static void mdfour_tail(const unsigned char *in, size_t n) { - unsigned char buf[128]; + unsigned char buf[128] = { 0 }; uint32_t M[16]; uint32_t b; @@ -120,7 +120,6 @@ static void mdfour_tail(const unsigned char *in, size_t n) b = m->totalN * 8; - memset(buf, 0, 128); if (n) memcpy(buf, in, n); buf[n] = 0x80;