Blob Blame History Raw
--- src/mn-client-session.c.orig	2012-04-05 16:13:12.078530159 +0200
+++ src/mn-client-session.c	2012-04-05 16:18:30.823859820 +0200
@@ -679,7 +679,7 @@
       else
 	{
 	  unsigned char md5sum[16];
-	  unsigned char fingerprint[40];
+	  unsigned char fingerprint[49];
 	  int md5len;
 	  int i;
 	  unsigned char *f;
@@ -687,6 +687,7 @@
 	  /* calculate the MD5 hash of the raw certificate */
 	  md5len = sizeof(md5sum);
 	  X509_digest(cert, EVP_md5(), md5sum, &md5len);
+	  memset(fingerprint, 0, sizeof(fingerprint));
 	  for (i = 0, f = fingerprint; i < 16; i++, f += 3)
 	    sprintf(f, "%.2x%c", md5sum[i], i != 15 ? ':' : '\0');