[Commits] [SCM] claws branch, master, updated. 3.17.3-154-g0c330bd

ticho at claws-mail.org ticho at claws-mail.org
Tue Apr 23 23:58:50 CEST 2019


The branch, master has been updated
       via  0c330bd1e1f5ce77e160f46f06ba3431bbc5d921 (commit)
      from  8101fa7f5c1e01f3d7b9e2aa6873cf490f610a7b (commit)

Summary of changes:
 src/plugins/pgpmime/pgpmime.c |    3 +++
 1 file changed, 3 insertions(+)


- Log -----------------------------------------------------------------
commit 0c330bd1e1f5ce77e160f46f06ba3431bbc5d921
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Tue Apr 23 23:58:22 2019 +0200

    Fix memory leaks in pgpmime_sign() and pgpmime_encrypt()

diff --git a/src/plugins/pgpmime/pgpmime.c b/src/plugins/pgpmime/pgpmime.c
index 61eed9b..539c2f8 100644
--- a/src/plugins/pgpmime/pgpmime.c
+++ b/src/plugins/pgpmime/pgpmime.c
@@ -601,6 +601,7 @@ gboolean pgpmime_sign(MimeInfo *mimeinfo, PrefsAccount *account, const gchar *fr
 	newinfo->data.mem = g_malloc(len + 1);
 	g_memmove(newinfo->data.mem, sigcontent, len);
 	newinfo->data.mem[len] = '\0';
+	newinfo->tmp = TRUE;
 	g_node_append(sigmultipart->node, newinfo->node);
 
 	g_free(sigcontent);
@@ -736,6 +737,7 @@ gboolean pgpmime_encrypt(MimeInfo *mimeinfo, const gchar *encrypt_data)
 	newinfo->subtype = g_strdup("pgp-encrypted");
 	newinfo->content = MIMECONTENT_MEM;
 	newinfo->data.mem = g_strdup("Version: 1\n");
+	newinfo->tmp = TRUE;
 	g_node_append(encmultipart->node, newinfo->node);
 
 	newinfo = procmime_mimeinfo_new();
@@ -743,6 +745,7 @@ gboolean pgpmime_encrypt(MimeInfo *mimeinfo, const gchar *encrypt_data)
 	newinfo->subtype = g_strdup("octet-stream");
 	newinfo->content = MIMECONTENT_MEM;
 	newinfo->data.mem = g_malloc(len + 1);
+	newinfo->tmp = TRUE;
 	g_memmove(newinfo->data.mem, enccontent, len);
 	newinfo->data.mem[len] = '\0';
 	g_node_append(encmultipart->node, newinfo->node);

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list