[Commits] [SCM] claws branch, master, updated. 3.9.2-98-g3ae395b

mones at claws-mail.org mones at claws-mail.org
Mon Oct 28 09:41:34 CET 2013


The branch master of project "claws" (Claws Mail) has been updated
       via  3ae395b7c893fe8e535708ae0a46295d52c7f978 (commit)
      from  d07722d7d00132463f5a86266c22140a69aa477a (commit)


- Log -----------------------------------------------------------------
commit 3ae395b7c893fe8e535708ae0a46295d52c7f978
Author: Ricardo Mones <ricardo at mones.org>
Date:   Mon Oct 28 09:39:35 2013 +0100

    Fix segfault for addresses without name part
    
    Thanks Paul for reporting on irc ;-)

diff --git a/src/compose.c b/src/compose.c
index 1c8b05b..2021d9f 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -6138,16 +6138,18 @@ static gchar *compose_quote_list_of_addresses(gchar *str)
 	for (item = list; item != NULL; item = item->next) {
 		gchar *spec = item->data;
 		gchar *endofname = strstr(spec, " <");
-		*endofname = '\0';
-		QUOTE_IF_REQUIRED_NORMAL(qname, spec, return NULL);
-		*endofname = ' ';
-		if (*qname != *spec) { /* has been quoted, compute new */
-			gchar *addr = g_strdup(endofname);
-			gchar *name = g_strdup(qname);
-			faddr = g_strconcat(name, addr, NULL);
-			g_free(name);
-			g_free(addr);
-			debug_print("new auto-quoted address: '%s'", faddr);
+		if (endofname != NULL) {
+			*endofname = '\0';
+			QUOTE_IF_REQUIRED_NORMAL(qname, spec, return NULL);
+			*endofname = ' ';
+			if (*qname != *spec) { /* has been quoted, compute new */
+				gchar *addr = g_strdup(endofname);
+				gchar *name = g_strdup(qname);
+				faddr = g_strconcat(name, addr, NULL);
+				g_free(name);
+				g_free(addr);
+				debug_print("new auto-quoted address: '%s'", faddr);
+			}
 		}
 		if (result == NULL)
 			result = g_strdup((faddr != NULL)? faddr: spec);

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

Summary of changes:
 src/compose.c |   22 ++++++++++++----------
 1 files changed, 12 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list