From: Vsevolod Stakhov Date: Mon, 18 Aug 2014 13:57:05 +0000 (+0100) Subject: Fix recipients_distance function. X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=80347a1396a93e68c71214a70dddd2c01964250e;p=rspamd.git Fix recipients_distance function. --- diff --git a/src/expressions.c b/src/expressions.c index f63ec2d74..6f73e4943 100644 --- a/src/expressions.c +++ b/src/expressions.c @@ -1140,9 +1140,9 @@ rspamd_recipients_distance (struct worker_task *task, GList * args, void *unused #ifdef GMIME24 for (i = 0; i < num; i ++) { addr = internet_address_list_get_address (cur, i); - ar[i].name = memory_pool_strdup (task->task_pool, internet_address_get_name (addr)); + ar[i].name = internet_address_mailbox_get_addr ( + INTERNET_ADDRESS_MAILBOX (addr)); if (ar[i].name != NULL && (c = strchr (ar[i].name, '@')) != NULL) { - *c = '\0'; ar[i].addr = c + 1; } }