[Commits] [SCM] claws branch, master, updated. 3.13.2-114-g605671c

ticho at claws-mail.org ticho at claws-mail.org
Sat Apr 9 15:21:25 CEST 2016


The branch, master has been updated
       via  605671c5d1f854d8c3fe83e220a3e5651ac9d4e0 (commit)
      from  1f8a15286c5eb8cda42f4f9b88151900d0dc5fad (commit)

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


- Log -----------------------------------------------------------------
commit 605671c5d1f854d8c3fe83e220a3e5651ac9d4e0
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Sat Apr 9 15:21:13 2016 +0200

    Fix crash on deleting password from passwordstore.

diff --git a/src/passwordstore.c b/src/passwordstore.c
index d2394d8..2694d89 100644
--- a/src/passwordstore.c
+++ b/src/passwordstore.c
@@ -107,7 +107,7 @@ gboolean passwd_store_set(PasswordBlockType block_type,
 		const gchar *password,
 		gboolean encrypted)
 {
-	const gchar *p = password;
+	const gchar *p;
 	PasswordBlock *block;
 	gchar *encrypted_password;
 
@@ -117,8 +117,10 @@ gboolean passwd_store_set(PasswordBlockType block_type,
 	g_return_val_if_fail(password_id != NULL, FALSE);
 
 	/* Empty password string equals null password for us. */
-	if (strlen(password) == 0)
+	if (password == NULL || strlen(password) == 0)
 		p = NULL;
+	else
+		p = password;
 
 	debug_print("%s password '%s' in block (%d/%s)%s\n",
 			(p == NULL ? "Deleting" : "Storing"),

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list