[Commits] [SCM] claws branch, master, updated. 3.11.1-25-g278a5b0

Colin colin at claws-mail.org
Mon Nov 17 15:13:47 CET 2014


The branch, master has been updated
       via  278a5b047584d153cab765bacdf73cbcb795d4a0 (commit)
      from  07b572bc66dd5016e99e3e729055e8b8cdfa72cf (commit)

Summary of changes:
 src/common/utils.c |    4 ++++
 src/prefs_gtk.c    |    2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)


- Log -----------------------------------------------------------------
commit 278a5b047584d153cab765bacdf73cbcb795d4a0
Author: Colin Leroy <colin at colino.net>
Date:   Mon Nov 17 15:13:12 2014 +0100

    * Add a warning in case the length of the string isn't the length of
    the decoded base64 content.
    * Base64-encoded crypt results of the passwords can contain \0, so
    treat them as binary.

diff --git a/src/common/utils.c b/src/common/utils.c
index 9c3d940..f322ac8 100644
--- a/src/common/utils.c
+++ b/src/common/utils.c
@@ -5558,6 +5558,10 @@ guchar *g_base64_decode_zero(const gchar *text, gsize *out_len)
 
 	g_free(tmp);
 
+	if (strlen(out) != *out_len) {
+		g_warning ("strlen(out) %d != *out_len %d", strlen(out), *out_len);
+	}
+
 	return out;
 }
 
diff --git a/src/prefs_gtk.c b/src/prefs_gtk.c
index a4a14e2..897c9cf 100644
--- a/src/prefs_gtk.c
+++ b/src/prefs_gtk.c
@@ -222,7 +222,7 @@ static void prefs_config_parse_one_line(PrefParam *param, const gchar *buf)
 				gchar *tmp;
 				gsize len;
 
-				tmp = g_base64_decode_zero(&value[1], &len);
+				tmp = g_base64_decode(&value[1], &len);
 				passcrypt_decrypt(tmp, len);
 
 				*((gchar **)param[i].data) =

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list