From b36b03e17525007976d21f02d0e5949691e3c439 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sat, 21 Oct 2017 12:13:56 +0100 Subject: [PATCH] [Fix] Deal with another case when processing exceptions MFH: rspamd-1.6 --- src/libstat/tokenizers/tokenizers.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/libstat/tokenizers/tokenizers.c b/src/libstat/tokenizers/tokenizers.c index 49496a9d8..d79d68144 100644 --- a/src/libstat/tokenizers/tokenizers.c +++ b/src/libstat/tokenizers/tokenizers.c @@ -270,8 +270,16 @@ set_token: process_exception: if (token->len == 0 && processed > 0) { + /* + * We have processed something before the next exception, so + * continue processing on next iteration of this function call + */ token->len = p - token->begin; g_assert (token->len > 0); + + *cur = p; + + return TRUE; } if (ex->type == RSPAMD_EXCEPTION_URL) { -- 2.39.5