]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Another fix for exim workaround
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 26 May 2016 11:55:24 +0000 (12:55 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 26 May 2016 11:55:24 +0000 (12:55 +0100)
Issue: #637
Reported by: @FelixSchwarz

src/libmime/message.c

index 5b7c4ae2f0079d17012c413870cbbe0068b50ab0..b20da368a09bf5deb2662c33e75f036de8f94a5d 100644 (file)
@@ -1663,6 +1663,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 ++;
@@ -1678,6 +1679,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);
        /*