[Commits] [SCM] claws branch, master, updated. 4.3.1-30-g90759e29e

wwp at claws-mail.org wwp at claws-mail.org
Wed Mar 5 21:01:50 UTC 2025


The branch, master has been updated
       via  90759e29e40fdd11b911b3c5867ec20902e3b3f3 (commit)
      from  112daeb1bbc0233809f79d61efbb49ba35821d4a (commit)

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


- Log -----------------------------------------------------------------
commit 90759e29e40fdd11b911b3c5867ec20902e3b3f3
Author: wwp <subscript at free.fr>
Date:   Wed Mar 5 22:01:28 2025 +0100

    Fix type mismatch in comparisons.

diff --git a/src/common/ssl.c b/src/common/ssl.c
index 15745ca09..6b0a406bd 100644
--- a/src/common/ssl.c
+++ b/src/common/ssl.c
@@ -350,14 +350,14 @@ gnutls_x509_crt_t *ssl_get_certificate_chain(gnutls_session_t session, unsigned
 	raw_cert_list = gnutls_certificate_get_peers(session, list_len);
 
 	if (raw_cert_list && (*list_len>0) && gnutls_certificate_type_get(session) == GNUTLS_CRT_X509) {
-		int i = 0;
+		glong i = 0;
 
 		if (*list_len > 128)
 			*list_len = 128;
 
 		certs = g_malloc(sizeof(gnutls_x509_crt_t) * (*list_len));
 
-		for(i = 0 ; i < (*list_len) ; i++) {
+		for(i = 0 ; i < (glong)(*list_len) ; i++) {
 			int r;
 
 			gnutls_x509_crt_init(&certs[i]);
@@ -375,7 +375,7 @@ gnutls_x509_crt_t *ssl_get_certificate_chain(gnutls_session_t session, unsigned
 				gnutls_x509_crt_deinit(certs[i]);
 
 			g_free(certs);
-			*list_len = -1;
+			*list_len = 0;
 
 			return NULL;
 		}
@@ -387,8 +387,8 @@ gnutls_x509_crt_t *ssl_get_certificate_chain(gnutls_session_t session, unsigned
 gboolean ssl_init_socket(SockInfo *sockinfo)
 {
 	gnutls_session_t session;
-	int r, i;
-	unsigned int cert_list_length;
+	int r;
+	unsigned int i, cert_list_length;
 	gnutls_x509_crt_t *certs = NULL;
 	gnutls_certificate_credentials_t xcred;
 

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list