[Commits] [SCM] claws branch, master, updated. 3.12.0-45-g229e17d
Colin
colin at claws-mail.org
Mon Aug 10 20:58:45 CEST 2015
The branch, master has been updated
via 229e17d5b79d25bb0657c6b985af15ca15058356 (commit)
from 5ef1df1e1b1b977407504f664eb6029ef045f429 (commit)
Summary of changes:
src/plugins/pgpmime/pgpmime.c | 6 ++++--
src/plugins/smime/smime.c | 6 ++++--
2 files changed, 8 insertions(+), 4 deletions(-)
- Log -----------------------------------------------------------------
commit 229e17d5b79d25bb0657c6b985af15ca15058356
Author: Colin Leroy <colin at colino.net>
Date: Mon Aug 10 20:58:32 2015 +0200
Fix string leaks
diff --git a/src/plugins/pgpmime/pgpmime.c b/src/plugins/pgpmime/pgpmime.c
index afcf94e..05cef5c 100644
--- a/src/plugins/pgpmime/pgpmime.c
+++ b/src/plugins/pgpmime/pgpmime.c
@@ -544,8 +544,10 @@ gboolean pgpmime_sign(MimeInfo *mimeinfo, PrefsAccount *account, const gchar *fr
if (result && result->signatures) {
gpgme_new_signature_t sig = result->signatures;
if (gpgme_get_protocol(ctx) == GPGME_PROTOCOL_OpenPGP) {
- micalg = g_strdup_printf("pgp-%s", g_ascii_strdown(gpgme_hash_algo_name(
- result->signatures->hash_algo),-1));
+ gchar *down_algo = g_ascii_strdown(gpgme_hash_algo_name(
+ result->signatures->hash_algo), -1);
+ micalg = g_strdup_printf("pgp-%s", down_algo);
+ g_free(down_algo);
} else {
micalg = g_strdup(gpgme_hash_algo_name(
result->signatures->hash_algo));
diff --git a/src/plugins/smime/smime.c b/src/plugins/smime/smime.c
index e3970b6..5f7068b 100644
--- a/src/plugins/smime/smime.c
+++ b/src/plugins/smime/smime.c
@@ -642,8 +642,10 @@ gboolean smime_sign(MimeInfo *mimeinfo, PrefsAccount *account, const gchar *from
result = gpgme_op_sign_result(ctx);
if (result && result->signatures) {
if (gpgme_get_protocol(ctx) == GPGME_PROTOCOL_OpenPGP) {
- micalg = g_strdup_printf("pgp-%s", g_ascii_strdown(gpgme_hash_algo_name(
- result->signatures->hash_algo),-1));
+ gchar *down_algo = g_ascii_strdown(gpgme_hash_algo_name(
+ result->signatures->hash_algo), -1);
+ micalg = g_strdup_printf("pgp-%s", down_algo);
+ g_free(down_algo);
} else {
micalg = g_strdup(gpgme_hash_algo_name(
result->signatures->hash_algo));
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list