0.9.5claws22
[claws.git] / src / compose.c
index 43ff0dc8efd6be8346c0cea4f2ad0c2ac2baaa7c..dc100b6d9b8a05d4ea1f8cd735f9e26f70d41b56 100644 (file)
@@ -4072,9 +4072,9 @@ static gint compose_write_headers_from_headerlist(Compose *compose,
        if (write_header) {
                gchar *buf;
 
-               buf = g_new0(gchar, headerstr->len * 4);
+               buf = g_new0(gchar, headerstr->len * 4 + 256);
                compose_convert_header
-                       (buf, headerstr->len * 4, headerstr->str,
+                       (buf, headerstr->len * 4  + 256, headerstr->str,
                        strlen(header) + 2, TRUE);
                fprintf(fp, "%s: %s\n", header, buf);
                g_free(buf);