From: Vsevolod Stakhov Date: Tue, 28 Jul 2015 14:09:52 +0000 (+0100) Subject: Do not add too many tokens from headers. X-Git-Tag: 1.0.0~267 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4d6ff942ea5236dc0099e86db01eddfb3c0a121a;p=rspamd.git Do not add too many tokens from headers. --- diff --git a/src/libstat/stat_process.c b/src/libstat/stat_process.c index a04c2536e..a3f8d8a73 100644 --- a/src/libstat/stat_process.c +++ b/src/libstat/stat_process.c @@ -57,16 +57,16 @@ rspamd_stat_tokenize_header (struct rspamd_task *task, if (rh != NULL) { LL_FOREACH (rh, cur) { - if (cur->value != NULL) { - str.begin = cur->value; - str.len = strlen (cur->value); - g_array_append_val (ar, str); - } if (cur->decoded != NULL) { str.begin = cur->decoded; str.len = strlen (cur->decoded); g_array_append_val (ar, str); } + else if (cur->value != NULL) { + str.begin = cur->value; + str.len = strlen (cur->value); + g_array_append_val (ar, str); + } } } }