From: Vsevolod Stakhov Date: Tue, 1 Oct 2019 14:47:26 +0000 (+0100) Subject: [Minor] Fix one more received case X-Git-Tag: 2.0~88 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f17a1b6d74374bbf0ac0acc87a6dcdd63f1a551f;p=rspamd.git [Minor] Fix one more received case --- diff --git a/src/libmime/mime_headers.c b/src/libmime/mime_headers.c index f7eb86f2e..be3ffc7d0 100644 --- a/src/libmime/mime_headers.c +++ b/src/libmime/mime_headers.c @@ -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);