]> source.dussan.org Git - rspamd.git/commitdiff
[Minor] Do not go into utf8 checks on non utf8 leading characters
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 9 Aug 2021 13:09:00 +0000 (14:09 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 9 Aug 2021 13:23:59 +0000 (14:23 +0100)
src/libmime/message.c

index 532667e5d64c196638e80e17ecfa97a8fbc6cbe9..d788844a3fec42f1eb3b114ea88ea1f3f6f90c51 100644 (file)
@@ -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);