]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Fix one more received case
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 1 Oct 2019 14:47:26 +0000 (15:47 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 1 Oct 2019 14:47:26 +0000 (15:47 +0100)
src/libmime/mime_headers.c

index f7eb86f2ec5ed6599ae83aa10ad0a73ec02922c5..be3ffc7d0321bff7d9cd6a1714c8e4f6b5998800 100644 (file)
@@ -1126,7 +1126,7 @@ rspamd_smtp_received_process_part (struct rspamd_task *task,
                }
                break;
        case skip_spaces:
-               if (p > c) {
+               if (p > (const guchar *)data) {
                        *last = p - (const guchar *) data;
 
                        return npart;
@@ -1180,7 +1180,6 @@ rspamd_smtp_received_spill (struct rspamd_task *task,
        len = end > p ? end - p : 0;
        DL_APPEND (head, cur_part);
 
-
        if (len > 2 && (lc_map[p[0]] == 'b' &&
                                        lc_map[p[1]] == 'y')) {
                p += sizeof ("by") - 1;
@@ -1245,7 +1244,8 @@ rspamd_smtp_received_spill (struct rspamd_task *task,
                        }
 
                        if (!cur_part) {
-                               return NULL;
+                               p ++;
+                               len = end > p ? end - p : 0;
                        }
                        else {
                                g_assert (pos != 0);