diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-11-12 13:14:30 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2018-11-12 13:14:30 +0000 |
commit | 9826575c7a449c79d6cd99471c6d9cd74b4e91f9 (patch) | |
tree | d77c9cbc95fc78b704b7f7a0d1a2557814a0ae19 /src/libmime | |
parent | 093dd1190db7062e5c7f53c8bfb2af5a8e9faa5c (diff) | |
download | rspamd-9826575c7a449c79d6cd99471c6d9cd74b4e91f9.tar.gz rspamd-9826575c7a449c79d6cd99471c6d9cd74b4e91f9.zip |
[Fix] Add sanity check when applying mime boundaries heuristic
Diffstat (limited to 'src/libmime')
-rw-r--r-- | src/libmime/mime_parser.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libmime/mime_parser.c b/src/libmime/mime_parser.c index 2972d3389..37b312f44 100644 --- a/src/libmime/mime_parser.c +++ b/src/libmime/mime_parser.c @@ -1307,7 +1307,8 @@ rspamd_mime_parse_message (struct rspamd_task *task, start = st->start + start_boundary->start; - if ((ret = rspamd_mime_process_multipart_node (task, st, + if (end > start && + (ret = rspamd_mime_process_multipart_node (task, st, NULL, start, end, err)) != RSPAMD_MIME_PARSE_OK) { return ret; } |