diff options
author | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-11-05 17:45:16 +0000 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@highsecure.ru> | 2019-11-05 17:45:16 +0000 |
commit | 1e7b5d6fed44f53ea87090b5480112230ec8e044 (patch) | |
tree | 0b60e232476f5f8b7a9ce314285326e130ace8c8 | |
parent | fb454c9cdc366fd4ae3d98b557d29e2397ccfabc (diff) | |
download | rspamd-1e7b5d6fed44f53ea87090b5480112230ec8e044.tar.gz rspamd-1e7b5d6fed44f53ea87090b5480112230ec8e044.zip |
[Minor] Check boundary before calling for U8_NEXT
-rw-r--r-- | src/libmime/message.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libmime/message.c b/src/libmime/message.c index 648fa82c5..f3aba6001 100644 --- a/src/libmime/message.c +++ b/src/libmime/message.c @@ -242,7 +242,7 @@ rspamd_strip_newlines_parse (struct rspamd_task *task, U8_NEXT (begin, off, pe - begin, uc); if (uc != -1) { - while (p < pe) { + while (p < pe && off < (pe - begin)) { if (IS_ZERO_WIDTH_SPACE (uc)) { /* Invisible space ! */ task->flags |= RSPAMD_TASK_FLAG_BAD_UNICODE; |