aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime/message.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-01-22 17:09:15 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-01-22 17:09:15 +0000
commitdce90e99c7f42de3991824fb2a7a856159088f68 (patch)
tree022164d89e1eefbb46cf939885079df1e48f4fcf /src/libmime/message.c
parent78600f0726e8a4e29e3ba9eaf6aca376d864ee57 (diff)
downloadrspamd-dce90e99c7f42de3991824fb2a7a856159088f68.tar.gz
rspamd-dce90e99c7f42de3991824fb2a7a856159088f68.zip
Fix broken headers and task:has_flag
Diffstat (limited to 'src/libmime/message.c')
-rw-r--r--src/libmime/message.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libmime/message.c b/src/libmime/message.c
index da34ac9ca..a7a5a86b8 100644
--- a/src/libmime/message.c
+++ b/src/libmime/message.c
@@ -424,7 +424,7 @@ process_raw_headers (struct rspamd_task *task, GHashTable *target,
end = p + len;
c = p;
- while (p <= end) {
+ while (p < end) {
/* FSM for processing headers */
switch (state) {
case 0:
@@ -457,6 +457,7 @@ process_raw_headers (struct rspamd_task *task, GHashTable *target,
}
else if (g_ascii_isspace (*p)) {
/* Not header but some garbage */
+ task->flags |= RSPAMD_TASK_FLAG_BROKEN_HEADERS;
state = 100;
next_state = 0;
}
@@ -598,7 +599,6 @@ process_raw_headers (struct rspamd_task *task, GHashTable *target,
break;
case 100:
/* Fail state, skip line */
- task->flags |= RSPAMD_TASK_FLAG_BROKEN_HEADERS;
if (*p == '\r') {
if (*(p + 1) == '\n') {