From: Vsevolod Stakhov Date: Wed, 29 Mar 2017 16:02:21 +0000 (+0100) Subject: [Minor] Properly deal with content type parameter X-Git-Tag: 1.5.5~84 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=bb63c3f414e8993f6d22f527316b4c9982793da9;p=rspamd.git [Minor] Properly deal with content type parameter --- diff --git a/src/libmime/message.c b/src/libmime/message.c index 91e32be33..f6d23b686 100644 --- a/src/libmime/message.c +++ b/src/libmime/message.c @@ -441,7 +441,8 @@ rspamd_message_process_text_part (struct rspamd_task *task, } if (found_txt || found_html) { - msg_info_task ("found text part with incorrect content-type: %T/%T", + msg_info_task ("found %s part with incorrect content-type: %T/%T", + found_html ? "html" : "text", &mime_part->ct->type, &mime_part->ct->subtype); mime_part->ct->flags |= RSPAMD_CONTENT_TYPE_BROKEN; } diff --git a/src/libmime/mime_parser.c b/src/libmime/mime_parser.c index e994dc795..193a3808c 100644 --- a/src/libmime/mime_parser.c +++ b/src/libmime/mime_parser.c @@ -313,7 +313,8 @@ rspamd_mime_part_get_cd (struct rspamd_task *task, struct rspamd_mime_part *part guint i; GPtrArray *hdrs; struct rspamd_content_disposition *cd = NULL; - rspamd_ftok_t srch, *found; + rspamd_ftok_t srch; + struct rspamd_content_type_param *found; hdrs = rspamd_message_get_header_from_hash (part->raw_headers, task->task_pool, @@ -336,7 +337,7 @@ rspamd_mime_part_get_cd (struct rspamd_task *task, struct rspamd_mime_part *part if (found) { cd->type = RSPAMD_CT_ATTACHMENT; - memcpy (&cd->filename, found, sizeof (cd->filename)); + memcpy (&cd->filename, &found->value, sizeof (cd->filename)); } }