From 4d6ff942ea5236dc0099e86db01eddfb3c0a121a Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Tue, 28 Jul 2015 15:09:52 +0100 Subject: [PATCH] Do not add too many tokens from headers. --- src/libstat/stat_process.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/libstat/stat_process.c b/src/libstat/stat_process.c index a04c2536e9..a3f8d8a736 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); + } } } } -- 2.47.3