From: Vsevolod Stakhov Date: Thu, 26 May 2016 11:55:24 +0000 (+0100) Subject: [Fix] Another fix for exim workaround X-Git-Tag: 1.2.8~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21dcb9b77ea5ac46b5a1ae8915600437a494b2f8;p=thirdparty%2Frspamd.git [Fix] Another fix for exim workaround Issue: #637 Reported by: @FelixSchwarz --- diff --git a/src/libmime/message.c b/src/libmime/message.c index 7dc35f8f33..b94c6185c5 100644 --- a/src/libmime/message.c +++ b/src/libmime/message.c @@ -1643,6 +1643,7 @@ rspamd_message_parse (struct rspamd_task *task) /* Skip to CRLF */ msg_info_task ("mailbox input detected, enable workaround"); p += sizeof ("From ") - 1; + len -= sizeof ("From ") - 1; while (len > 0 && *p != '\n') { p ++; @@ -1658,6 +1659,8 @@ rspamd_message_parse (struct rspamd_task *task) tmp->data = (guint8 *)p; tmp->len = len; + task->msg.begin = p; + task->msg.len = len; stream = g_mime_stream_mem_new_with_byte_array (tmp); /*