aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-11-12 13:14:30 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-11-12 13:14:30 +0000
commit9826575c7a449c79d6cd99471c6d9cd74b4e91f9 (patch)
treed77c9cbc95fc78b704b7f7a0d1a2557814a0ae19 /src/libmime
parent093dd1190db7062e5c7f53c8bfb2af5a8e9faa5c (diff)
downloadrspamd-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.c3
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;
}