aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-11-13 15:35:41 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-11-13 15:35:41 +0000
commita305a311726f6ff5c1d650765e0f239e677768ff (patch)
treee9ff9cbefe34faabd2234aebf1b886a36c009f47 /src/libmime
parentb4367c0c90b7ee7a4db77c169becff7c958ba23f (diff)
downloadrspamd-a305a311726f6ff5c1d650765e0f239e677768ff.tar.gz
rspamd-a305a311726f6ff5c1d650765e0f239e677768ff.zip
Fix processing of headers.
Diffstat (limited to 'src/libmime')
-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 a007e61b1..b8f6b387b 100644
--- a/src/libmime/message.c
+++ b/src/libmime/message.c
@@ -1611,9 +1611,9 @@ rspamd_message_parse (struct rspamd_task *task)
hdr_pos = rspamd_string_find_eoh (&str);
- if (hdr_pos > 0) {
+ if (hdr_pos > 0 && hdr_pos < tmp->len) {
task->raw_headers_content.begin = (gchar *) (p);
- task->raw_headers_content.len = (guint64) (p + hdr_pos);
+ task->raw_headers_content.len = (guint64) (hdr_pos);
if (task->raw_headers_content.len > 0) {
process_raw_headers (task, task->raw_headers,