]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix last token folding
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 2 Aug 2016 16:16:28 +0000 (17:16 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 2 Aug 2016 16:16:28 +0000 (17:16 +0100)
src/libutil/str_util.c

index fbaa26c0f6fb1436392276b17ced509e92e008a7..f8441dcf1bc551e8584d51411e27dbf7796d67b7 100644 (file)
@@ -1152,6 +1152,9 @@ rspamd_header_value_fold (const gchar *name,
        switch (state) {
        case read_token:
                if (cur_len > fold_max && !first_token) {
+                       if (g_ascii_isspace (*c)) {
+                               c ++;
+                       }
                        g_string_append_len (res, "\r\n\t", 3);
                        g_string_append_len (res, c, p - c);
                }