diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-12-18 17:14:54 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2016-12-18 17:14:54 +0000 |
commit | 5efc6ae1edae1fa5da02daff68d41fc5f4bac5fd (patch) | |
tree | c33dd50e264994c91e654725eaf422dfdac2a91f /src/libmime/mime_parser.c | |
parent | 8f1e31554cfa4e9b9f74f5499c3d446ff155839c (diff) | |
download | rspamd-5efc6ae1edae1fa5da02daff68d41fc5f4bac5fd.tar.gz rspamd-5efc6ae1edae1fa5da02daff68d41fc5f4bac5fd.zip |
[Fix] Fix processing of non-multipart messages
Diffstat (limited to 'src/libmime/mime_parser.c')
-rw-r--r-- | src/libmime/mime_parser.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libmime/mime_parser.c b/src/libmime/mime_parser.c index 99ee485a3..ca31bac8c 100644 --- a/src/libmime/mime_parser.c +++ b/src/libmime/mime_parser.c @@ -692,8 +692,8 @@ rspamd_mime_preprocess_cb (struct rspamd_multipattern *mp, bend ++; } - b.boundary = p - text - 3; - b.start = bend - text - 1; + b.boundary = p - st->start - 3; + b.start = bend - st->start - 1; lc_copy = g_malloc (blen); memcpy (lc_copy, p, blen); @@ -825,7 +825,7 @@ rspamd_mime_parse_message (struct rspamd_task *task, "Content-Type", FALSE); } - pbegin = st->pos; + pbegin = st->start + body_pos; plen = st->end - pbegin; npart->raw_headers = g_hash_table_ref (task->raw_headers); } |