aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2018-11-30 15:17:11 +0000
committerVsevolod Stakhov <vsevolod@highsecure.ru>2018-11-30 15:17:11 +0000
commit887a1a5432b24b2973a7f8f60b02192db2bcff76 (patch)
treee17f391afdc47eb092125f6606402ae898e2e60e
parent8857f667412c2db45c5d346575db3eb1cf398b04 (diff)
downloadrspamd-887a1a5432b24b2973a7f8f60b02192db2bcff76.tar.gz
rspamd-887a1a5432b24b2973a7f8f60b02192db2bcff76.zip
[Fix] Fix boundaries checks in embedded messages
-rw-r--r--src/libmime/mime_parser.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/libmime/mime_parser.c b/src/libmime/mime_parser.c
index 2f999de89..5cfda74bf 100644
--- a/src/libmime/mime_parser.c
+++ b/src/libmime/mime_parser.c
@@ -1294,7 +1294,7 @@ rspamd_mime_parse_message (struct rspamd_task *task,
start_boundary = NULL;
for (i = sel_idx; i < nst->boundaries->len; i++) {
- boundary = &g_array_index (st->boundaries,
+ boundary = &g_array_index (nst->boundaries,
struct rspamd_mime_boundary, i);
if (boundary->start > cur_offset &&
@@ -1310,17 +1310,17 @@ rspamd_mime_parse_message (struct rspamd_task *task,
const gchar *start, *end;
if (nst->boundaries->len > sel_idx + 1) {
- end_boundary = &g_array_index (st->boundaries,
+ end_boundary = &g_array_index (nst->boundaries,
struct rspamd_mime_boundary, sel_idx + 1);
- end = st->start + end_boundary->boundary;
+ end = nst->start + end_boundary->boundary;
}
else {
- end = st->end;
+ end = nst->end;
}
sel_idx ++;
- start = st->start + start_boundary->start;
+ start = nst->start + start_boundary->start;
if (end > start &&
(ret = rspamd_mime_process_multipart_node (task, st,