From: Vsevolod Stakhov Date: Fri, 21 Jan 2011 15:33:27 +0000 (+0300) Subject: Avoid gmime asserts if no recipients are passed from MTA. X-Git-Tag: 0.3.7~78 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b2ac22cb599cbba8fc056aa1ebecbdd8735699a1;p=rspamd.git Avoid gmime asserts if no recipients are passed from MTA. --- 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;