[Commits] [SCM] claws branch, master, updated. 3.13.2-32-g483f9b0

ticho at claws-mail.org ticho at claws-mail.org
Thu Feb 11 00:53:19 CET 2016


The branch, master has been updated
       via  483f9b039ebac3c95313b596df060571f5f00840 (commit)
      from  2836acb33589ba81188513fddc632836c6b1e2ff (commit)

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


- Log -----------------------------------------------------------------
commit 483f9b039ebac3c95313b596df060571f5f00840
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Thu Feb 11 00:52:49 2016 +0100

    Fix two crashes in IMAP introduced by the passwords change.

diff --git a/src/imap.c b/src/imap.c
index d5df6dc..f40d002 100644
--- a/src/imap.c
+++ b/src/imap.c
@@ -1284,9 +1284,11 @@ try_again:
 	if ((ok = imap_auth(session, account->userid, pass, account->imap_auth_type)) != MAILIMAP_NO_ERROR) {
 		
 		if (!failed && !is_fatal(ok)) {
-			memset(acc_pass, 0, strlen(acc_pass));
-			g_free(acc_pass);
-			acc_pass = NULL;
+			if (acc_pass != NULL) {
+				memset(acc_pass, 0, strlen(acc_pass));
+				g_free(acc_pass);
+				acc_pass = NULL;
+			}
 			failed = TRUE;
 			if (account->session_passwd != NULL) {
 				g_free(account->session_passwd);
@@ -1301,8 +1303,11 @@ try_again:
 				alertpanel_error_log(_("Couldn't login to IMAP server %s."), account->recv_server);
 		}
 
-		g_free(acc_pass);
-		memset(acc_pass, 0, strlen(acc_pass));
+		if (acc_pass != NULL) {
+			g_free(acc_pass);
+			memset(acc_pass, 0, strlen(acc_pass));
+		}
+
 		return ok;
 	} 
 

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list