]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix byte array allocation in the pool
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 11 Sep 2018 17:22:59 +0000 (18:22 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 11 Sep 2018 17:22:59 +0000 (18:22 +0100)
src/libmime/mime_encoding.c

index bc769ce9210dd05852bbce58728caf143ca7eb67..7fd75af9da26aa0d90d5c97bdf48a061237fe267 100644 (file)
@@ -449,7 +449,7 @@ rspamd_mime_text_part_utf8_convert (struct rspamd_task *task,
        msg_info_task ("converted from %s to UTF-8 inlen: %z, outlen: %d",
                        charset, input->len, r);
        text_part->utf_raw_content = rspamd_mempool_alloc (task->task_pool,
-                       sizeof (text_part->utf_raw_content));
+                       sizeof (*text_part->utf_raw_content) + sizeof (gpointer) * 4);
        text_part->utf_raw_content->data = d;
        text_part->utf_raw_content->len = r;