From b2ac22cb599cbba8fc056aa1ebecbdd8735699a1 Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 21 Jan 2011 18:33:27 +0300 Subject: [PATCH] Avoid gmime asserts if no recipients are passed from MTA. --- src/expressions.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/expressions.c b/src/expressions.c index 21409c81e..24540b44c 100644 --- a/src/expressions.c +++ b/src/expressions.c @@ -1406,6 +1406,9 @@ rspamd_recipients_distance (struct worker_task *task, GList * args, void *unused return FALSE; } + if (!task->rcpts) { + return FALSE; + } num = internet_address_list_length (task->rcpts); if (num < MIN_RCPT_TO_COMPARE) { return FALSE; -- 2.39.5