aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2019-10-01 15:47:26 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2019-10-01 15:47:26 +0100
commitf17a1b6d74374bbf0ac0acc87a6dcdd63f1a551f (patch)
treee53ec3b2753cff676183459ad640f207e901025c
parentc1f9bfc86391e4be50a5fbd16a7b899288a3a84c (diff)
downloadrspamd-f17a1b6d74374bbf0ac0acc87a6dcdd63f1a551f.tar.gz
rspamd-f17a1b6d74374bbf0ac0acc87a6dcdd63f1a551f.zip
[Minor] Fix one more received case
-rw-r--r--src/libmime/mime_headers.c6
1 files changed, 3 insertions, 3 deletions
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);