[Commits] [SCM] claws branch, master, updated. 3.13.2-158-g9854220

charles at claws-mail.org charles at claws-mail.org
Mon Jun 27 19:54:43 CEST 2016


The branch, master has been updated
       via  9854220303add1bc4e51056feb44a8f69b25529d (commit)
      from  18292e3bbdb1c1cf3da8ad4c4a0edaa4f9c048c7 (commit)

Summary of changes:
 src/plugins/vcalendar/vcal_manager.c |    9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)


- Log -----------------------------------------------------------------
commit 9854220303add1bc4e51056feb44a8f69b25529d
Author: Charles Lehner <charles at claws-mail.org>
Date:   Mon Jun 27 13:52:57 2016 -0400

    Allocate quoted-printable output buffer on heap

diff --git a/src/plugins/vcalendar/vcal_manager.c b/src/plugins/vcalendar/vcal_manager.c
index 9c9c856..e367c42 100644
--- a/src/plugins/vcalendar/vcal_manager.c
+++ b/src/plugins/vcalendar/vcal_manager.c
@@ -731,16 +731,17 @@ gchar *vcal_manager_icalevent_dump(icalcomponent *event, gchar *orga, icalcompon
 	while (lines[i]) {
 		gint e_len = strlen(qpbody), n_len = 0;
 		gchar *outline = conv_codeset_strdup(lines[i], CS_UTF_8, conv_get_outgoing_charset_str());
-		gchar buf[strlen(outline)*8];
+		gchar *qpoutline = g_malloc(strlen(outline)*8 + 1);
 		
-		qp_encode_line(buf, (guchar *)outline);
-		n_len = strlen(buf);
+		qp_encode_line(qpoutline, (guchar *)outline);
+		n_len = strlen(qpoutline);
 		
 		qpbody = g_realloc(qpbody, e_len + n_len + 1);
-		strcpy(qpbody+e_len, buf);
+		strcpy(qpbody+e_len, qpoutline);
 		*(qpbody+n_len+e_len) = '\0';
 		
 		g_free(outline);
+		g_free(qpoutline);
 		i++;
 	}
 	

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list