[Commits] [SCM] claws branch, master, updated. 3.13.2-16-gb7477fb

mones at claws-mail.org mones at claws-mail.org
Sat Feb 6 23:50:21 CET 2016


The branch, master has been updated
       via  b7477fbe534b8d1712b27a737d55b82c2a294b97 (commit)
      from  eb130cbe507a9877d59d444065140960a828af67 (commit)

Summary of changes:
 src/imap.c |    6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)


- Log -----------------------------------------------------------------
commit b7477fbe534b8d1712b27a737d55b82c2a294b97
Author: Ricardo Mones <ricardo at mones.org>
Date:   Sat Feb 6 23:49:51 2016 +0100

    Fix segfault when account password is not saved…
    
    …in account preferences, introduced also in 54adfb4.
    In this case acc_pass is NULL, so it must be checked
    before trying to dereference it.

diff --git a/src/imap.c b/src/imap.c
index df0fbc5..d5df6dc 100644
--- a/src/imap.c
+++ b/src/imap.c
@@ -1306,8 +1306,10 @@ try_again:
 		return ok;
 	} 
 
-	memset(acc_pass, 0, strlen(acc_pass));
-	g_free(acc_pass);
+	if (acc_pass) {
+		memset(acc_pass, 0, strlen(acc_pass));
+		g_free(acc_pass);
+	}
 	statuswindow_pop_all();
 	session->authenticated = TRUE;
 	return MAILIMAP_NO_ERROR;

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list