commit 86e3a15: [Minor] Do not go into utf8 checks on non utf8 leading characters
Vsevolod Stakhov
vsevolod at highsecure.ru
Mon Aug 9 13:28:04 UTC 2021
Author: Vsevolod Stakhov
Date: 2021-08-09 14:09:00 +0100
URL: https://github.com/rspamd/rspamd/commit/86e3a152fbf073ec59df0f2b18a825b27ce6b710 (HEAD -> master)
[Minor] Do not go into utf8 checks on non utf8 leading characters
---
src/libmime/message.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/libmime/message.c b/src/libmime/message.c
index 532667e5d..d788844a3 100644
--- a/src/libmime/message.c
+++ b/src/libmime/message.c
@@ -240,7 +240,7 @@ rspamd_strip_newlines_parse (struct rspamd_task *task,
} state = normal_char;
while (p < pe) {
- if (is_utf) {
+ if (U8_IS_LEAD(*p) && is_utf) {
gint32 off = p - begin;
U8_NEXT (begin, off, pe - begin, uc);
More information about the Commits
mailing list