diff options
author | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-08-26 15:04:07 +0400 |
---|---|---|
committer | Vsevolod Stakhov <vsevolod@rambler-co.ru> | 2010-08-26 15:04:07 +0400 |
commit | 460852a9aba9aa7a5bfc9a83d243d9a45fe14f34 (patch) | |
tree | f7bba62ed74da345b145c49f85613f85cf963c3f /src | |
parent | 59822ebf58a3bf9f0a3bb97150206013be3b43d7 (diff) | |
download | rspamd-460852a9aba9aa7a5bfc9a83d243d9a45fe14f34.tar.gz rspamd-460852a9aba9aa7a5bfc9a83d243d9a45fe14f34.zip |
* Fix assertion while extracting internet address
Diffstat (limited to 'src')
-rw-r--r-- | src/expressions.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/expressions.c b/src/expressions.c index c009ddc84..d6e6647f1 100644 --- a/src/expressions.c +++ b/src/expressions.c @@ -1359,14 +1359,16 @@ is_recipient_list_sorted (const InternetAddressList * ia) cur = ia; while (cur) { addr = internet_address_list_get_address (cur); - current.addr = internet_address_get_addr (addr); - if (previous.addr != NULL) { - if (current.addr && g_ascii_strcasecmp (current.addr, previous.addr) < 0) { - res = FALSE; - break; + if (internet_address_get_type (addr) == INTERNET_ADDRESS_NAME) { + current.addr = internet_address_get_addr (addr); + if (previous.addr != NULL) { + if (current.addr && g_ascii_strcasecmp (current.addr, previous.addr) < 0) { + res = FALSE; + break; + } } + previous.addr = current.addr; } - previous.addr = current.addr; cur = internet_address_list_next (cur); } #endif |