[Commits] [SCM] claws branch, master, updated. 3.17.3-155-g18bd82c

ticho at claws-mail.org ticho at claws-mail.org
Wed Apr 24 00:05:06 CEST 2019


The branch, master has been updated
       via  18bd82c8d833626d0edf033c9b313cfe7efe9a6e (commit)
      from  0c330bd1e1f5ce77e160f46f06ba3431bbc5d921 (commit)

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


- Log -----------------------------------------------------------------
commit 18bd82c8d833626d0edf033c9b313cfe7efe9a6e
Author: Andrej Kacian <ticho at claws-mail.org>
Date:   Wed Apr 24 00:03:27 2019 +0200

    Fix memory leak in smime_sign() and forgotten removal of a temporary file in smime_encrypt()

diff --git a/src/plugins/smime/smime.c b/src/plugins/smime/smime.c
index f0cd96f..fd50f1e 100644
--- a/src/plugins/smime/smime.c
+++ b/src/plugins/smime/smime.c
@@ -691,6 +691,7 @@ gboolean smime_sign(MimeInfo *mimeinfo, PrefsAccount *account, const gchar *from
 	g_hash_table_insert(newinfo->dispositionparameters, g_strdup("filename"),
 			    g_strdup("smime.p7s"));
 	newinfo->data.mem = g_malloc(len + 1);
+	newinfo->tmp = TRUE;
 	g_memmove(newinfo->data.mem, real_content, len);
 	newinfo->data.mem[len] = '\0';
 	newinfo->encoding_type = ENC_BASE64;
@@ -869,6 +870,7 @@ gboolean smime_encrypt(MimeInfo *mimeinfo, const gchar *encrypt_data)
 
 	encmultipart->content = MIMECONTENT_FILE;
 	encmultipart->data.filename = tmpfile;
+	encmultipart->tmp = TRUE;
 	procmime_encode_content(encmultipart, ENC_BASE64);
 
 	g_free(enccontent);

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list