[Commits] [SCM] claws branch, master, updated. 3.13.0-94-gbe4091e

charles at claws-mail.org charles at claws-mail.org
Fri Dec 4 00:59:25 CET 2015


The branch, master has been updated
       via  be4091e52342eb578944733861a77ca78e66eb6f (commit)
      from  610b8c5dccea59ffc5f2b609c8c9081372f5af24 (commit)

Summary of changes:
 src/plugins/managesieve/sieve_prefs.c |   12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)


- Log -----------------------------------------------------------------
commit be4091e52342eb578944733861a77ca78e66eb6f
Author: Charles Lehner <celehner1 at gmail.com>
Date:   Thu Dec 3 18:50:15 2015 -0500

    Fix enum scan on powerpc
    
    Casting the enum pointers to char pointers (or unsigned char pointers) was
    leading to config->auth getting the wrong value scanned on little-endian 32-bit
    PowerPC systems. Using separate variables and implicit type coercion fixes this.

diff --git a/src/plugins/managesieve/sieve_prefs.c b/src/plugins/managesieve/sieve_prefs.c
index 9976da7..0d53762 100644
--- a/src/plugins/managesieve/sieve_prefs.c
+++ b/src/plugins/managesieve/sieve_prefs.c
@@ -463,6 +463,7 @@ struct SieveAccountConfig *sieve_prefs_account_get_config(
 	const gchar *confstr;
 	gchar enc_userid[256], enc_passwd[256];
 	gchar enable, use_host, use_port;
+	guchar tls_type, auth, auth_type;
 	gsize len;
 #if defined(G_OS_WIN32) || defined(__OpenBSD__)
 	/* Windows sscanf() does not understand the %ms format yet, so we
@@ -501,12 +502,17 @@ struct SieveAccountConfig *sieve_prefs_account_get_config(
 			&config->host,
 #endif
 			&use_port, &config->port,
-			(char *)&config->tls_type,
-			(char *)&config->auth,
-			(char *)&config->auth_type,
+			&tls_type,
+			&auth,
+			&auth_type,
 			enc_userid,
 			enc_passwd);
 
+	/* Scan enums separately, for endian purposes */
+	config->tls_type = tls_type;
+	config->auth = auth;
+	config->auth_type = auth_type;
+
 #if defined(G_OS_WIN32) || defined(__OpenBSD__)
 	config->host = g_strndup(tmphost, 255);
 #endif

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list