From: Tollef Fog Heen Date: Mon, 12 Oct 2009 08:30:56 +0000 (+0200) Subject: Zero memory first, to quieten valgrind X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c4960d4f693e464db8a3c8f8ed300bf6e9941c3b;p=yubikey-server-c Zero memory first, to quieten valgrind --- diff --git a/src/util.c b/src/util.c index 94d7793..7e856cf 100644 --- a/src/util.c +++ b/src/util.c @@ -120,7 +120,7 @@ static void ysc_b64_encodeblock(unsigned char in[3], unsigned char out[4], int l char *ysc_b64_encode(char *s, ssize_t len) { - char *r = malloc((len/3+1)*4+1); + char *r = calloc((len/3+1)*4+1, 1); char *tmp = r; unsigned char out[4];