Add a wrapper function to decode base64, returning a null-terminated string.
[claws.git] / src / unmime.c
index aeda9e4..9848977 100644 (file)
@@ -113,9 +113,8 @@ gchar *unmime_header(const gchar *encoded_str, gboolean addr_field)
                if (encoding == 'B') {
                        gchar *tmp;
                        tmp = g_strndup(text_begin_p + 1, eword_end_p - (text_begin_p + 1) + 1);
-                       decoded_text = g_base64_decode(tmp, &out_len);
+                       decoded_text = g_base64_decode_zero(tmp, &out_len);
                        g_free(tmp);
-                       decoded_text[out_len] = '\0';
                } else if (encoding == 'Q') {
                        decoded_text = g_malloc
                                (eword_end_p - (text_begin_p + 1) + 1);