diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-01-22 17:09:15 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-01-22 17:09:15 +0000 |
commit | dce90e99c7f42de3991824fb2a7a856159088f68 (patch) | |
tree | 022164d89e1eefbb46cf939885079df1e48f4fcf /src/libmime/message.c | |
parent | 78600f0726e8a4e29e3ba9eaf6aca376d864ee57 (diff) | |
download | rspamd-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.c | 4 |
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') { |