]> source.dussan.org Git - rspamd.git/commitdiff
[Fix] Fix folding for semicolon separated tokens
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 2 Aug 2016 15:32:33 +0000 (16:32 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Tue, 2 Aug 2016 15:32:33 +0000 (16:32 +0100)
src/libutil/str_util.c

index c39dcb7ee101a463e17d0dab6538b58fbe6af3aa..fbaa26c0f6fb1436392276b17ced509e92e008a7 100644 (file)
@@ -1054,8 +1054,8 @@ rspamd_header_value_fold (const gchar *name,
                                        next_state = read_token;
                                }
                                else {
-                                       g_string_append_len (res, c, p - c);
-                                       c = p;
+                                       g_string_append_len (res, c, p - c + 1);
+                                       c = p + 1;
                                        first_token = FALSE;
                                }
                                p ++;