[Commits] [SCM] claws branch, master, updated. 3.10.0-35-g75da952

Colin colin at claws-mail.org
Mon Jun 2 14:41:31 CEST 2014


The branch master of project "claws" (Claws Mail) has been updated
       via  75da952813ff61e16cfa6b9e15ce4f9bedf0c608 (commit)
      from  4f4eb49ebeec8ea6638eac2efdff7aff2b2d408d (commit)


- Log -----------------------------------------------------------------
commit 75da952813ff61e16cfa6b9e15ce4f9bedf0c608
Author: Colin Leroy <colin at colino.net>
Date:   Mon Jun 2 14:41:12 2014 +0200

    Fix another uninitialized variable (and make things more clear)

diff --git a/src/common/ssl_certificate.c b/src/common/ssl_certificate.c
index 870ceb0..7fbfe5d 100644
--- a/src/common/ssl_certificate.c
+++ b/src/common/ssl_certificate.c
@@ -156,7 +156,7 @@ static SSLCertificate *ssl_certificate_new(gnutls_x509_crt_t x509_cert, const gc
 	cert->port = port;
 	
 	/* fingerprint */
-	n = 128;
+	n = sizeof(md);
 	gnutls_x509_crt_get_fingerprint(cert->x509_cert, GNUTLS_DIG_MD5, md, &n);
 	cert->fingerprint = readable_fingerprint(md, (int)n);
 	return cert;
@@ -654,6 +654,7 @@ static void ssl_certificate_save_chain(gnutls_x509_crt_t *certs, gint len, const
 		gchar *fingerprint;
 
 		if (i == 0) {
+			n = sizeof(md);
 			gnutls_x509_crt_get_fingerprint(cert, GNUTLS_DIG_MD5, md, &n);
 			fingerprint = readable_fingerprint(md, n);
 			gchar *buf = g_strdup_printf("%d", port);
@@ -699,7 +700,7 @@ gboolean ssl_certificate_check (gnutls_x509_crt_t x509_cert, guint status,
 
 	current_cert->status = status;
 	/* fingerprint */
-	n = 128;
+	n = sizeof(md);
 	gnutls_x509_crt_get_fingerprint(x509_cert, GNUTLS_DIG_MD5, md, &n);
 	fingerprint = readable_fingerprint(md, n);
 

-----------------------------------------------------------------------

Summary of changes:
 src/common/ssl_certificate.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list