]> err.no Git - yubikey-server-c/commitdiff
Zero memory first, to quieten valgrind
authorTollef Fog Heen <tfheen@err.no>
Mon, 12 Oct 2009 08:30:56 +0000 (10:30 +0200)
committerTollef Fog Heen <tfheen@err.no>
Mon, 12 Oct 2009 08:30:56 +0000 (10:30 +0200)
src/util.c

index 94d779318ef266c3a9a82f4919f46914ecd33538..7e856cf544f1946f5095229e70c7b33842b254dc 100644 (file)
@@ -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];