]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Strip '\r\n' properly
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 16 Jun 2016 17:18:18 +0000 (18:18 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Thu, 16 Jun 2016 17:18:18 +0000 (18:18 +0100)
src/libmime/message.c

index db7cc6a5391c6281e743d315bd41483ff474f2ca..f6d07ab0986670060d2da1820bc261f27ca0f918 100644 (file)
@@ -679,6 +679,10 @@ rspamd_normalize_text_part (struct rspamd_task *task,
                p = memchr (c, '\n', end - c);
 
                if (p) {
+                       if (*(p - 1) == '\r') {
+                               p --;
+                       }
+
                        if (p > c) {
                                g_byte_array_append (part->stripped_content, c, p - c);
                        }