[Commits] [SCM] claws branch, master, updated. 3.11.1-38-g1ffe0d0

ticho at claws-mail.org ticho at claws-mail.org
Sun Dec 7 23:33:05 CET 2014


The branch, master has been updated
       via  1ffe0d0d1a4433fd841d282a9a65161044b08e21 (commit)
      from  e746281f5fd9a7678550c29c5618f67c50ee055b (commit)

Summary of changes:
 src/codeconv.c |    9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)


- Log -----------------------------------------------------------------
commit 1ffe0d0d1a4433fd841d282a9a65161044b08e21
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Sun Dec 7 23:31:41 2014 +0100

    Properly allocate buffer in conv_encode_header_full() for quoted-printable encoding. Closes bug #3338, reported by Michael Hughes.

diff --git a/src/codeconv.c b/src/codeconv.c
index 98b41b3..98981e1 100644
--- a/src/codeconv.c
+++ b/src/codeconv.c
@@ -1722,8 +1722,10 @@ void conv_encode_header_full(gchar *dest, gint len, const gchar *src,
 
 				if (use_base64)
 					enc_str = g_base64_encode(out_str, out_str_len);
-				else
+				else {
+					Xalloca(enc_str, out_enc_str_len + 1, );
 					qp_q_encode(enc_str, out_str);
+				}
 
 				g_free(out_str);
 
@@ -1732,7 +1734,10 @@ void conv_encode_header_full(gchar *dest, gint len, const gchar *src,
 				g_snprintf(destp, mime_block_len + 1,
 					   MIMESEP_BEGIN "%s%s%s" MIMESEP_END,
 					   out_encoding, mimesep_enc, enc_str);
-				g_free(enc_str);
+
+				if (use_base64)
+					g_free(enc_str);
+
 				destp += mime_block_len;
 				srcp += cur_len;
 

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list