[Commits] [SCM] claws branch, master, updated. 3.17.0-48-gfea0a74

ticho at claws-mail.org ticho at claws-mail.org
Thu Sep 6 23:32:49 CEST 2018


The branch, master has been updated
       via  fea0a7450600fb27689521dfda3e2d1aa147389e (commit)
      from  9472330754c7ae216e84b5f74595b07f48dc38b2 (commit)

Summary of changes:
 src/common/proxy.c  |    1 +
 src/prefs_account.c |    2 +-
 src/prefs_common.c  |    2 +-
 3 files changed, 3 insertions(+), 2 deletions(-)


- Log -----------------------------------------------------------------
commit fea0a7450600fb27689521dfda3e2d1aa147389e
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Thu Sep 6 23:31:16 2018 +0200

    Fix dangling pointer in proxy password handling.
    
    Initialize proxy_info.proxy_pass to NULL, and reset it
    back to NULL after use.

diff --git a/src/common/proxy.c b/src/common/proxy.c
index 7a30030..bffeb41 100644
--- a/src/common/proxy.c
+++ b/src/common/proxy.c
@@ -61,6 +61,7 @@ gint proxy_connect(SockInfo *sock, const gchar *hostname, gushort port,
 		if (proxy_info->proxy_pass != NULL) {
 			memset(proxy_info->proxy_pass, 0, strlen(proxy_info->proxy_pass));
 			g_free(proxy_info->proxy_pass);
+			proxy_info->proxy_pass = NULL;
 		}
 		return ret;
 	} else if (proxy_info->proxy_type == PROXY_SOCKS4) {
diff --git a/src/prefs_account.c b/src/prefs_account.c
index 9491d58..efac2ce 100644
--- a/src/prefs_account.c
+++ b/src/prefs_account.c
@@ -874,7 +874,7 @@ static PrefParam proxy_param[] = {
 	&proxy_page.proxy_name_entry,
 	prefs_set_data_from_entry, prefs_set_entry},
 
-	{"proxy_pass", "", &tmp_ac_prefs.proxy_info.proxy_pass, P_PASSWORD,
+	{"proxy_pass", NULL, &tmp_ac_prefs.proxy_info.proxy_pass, P_PASSWORD,
 	NULL, NULL, NULL},
 
 
diff --git a/src/prefs_common.c b/src/prefs_common.c
index c7dc37c..b479e0f 100644
--- a/src/prefs_common.c
+++ b/src/prefs_common.c
@@ -1262,7 +1262,7 @@ static PrefParam param[] = {
 	{"proxy_port", "1080", &prefs_common.proxy_info.proxy_port, P_USHORT, NULL, NULL, NULL},
 	{"use_proxy_auth", "FALSE", &prefs_common.proxy_info.use_proxy_auth, P_BOOL, NULL, NULL, NULL},
 	{"proxy_name", "", &prefs_common.proxy_info.proxy_name, P_STRING, NULL, NULL, NULL},
-	{"proxy_pass", "", &prefs_common.proxy_info.proxy_pass, P_STRING, NULL, NULL, NULL},
+	{"proxy_pass", NULL, &prefs_common.proxy_info.proxy_pass, P_STRING, NULL, NULL, NULL},
 
 	{NULL, NULL, NULL, P_OTHER, NULL, NULL, NULL}
 };

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list