aboutsummaryrefslogtreecommitdiffstats
path: root/src/libmime/message.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2015-07-14 00:09:30 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2015-07-14 00:09:30 +0100
commit94b191253638b84e78d4dbf9ce0321674a52e3ca (patch)
treeef1457640ccadc9e6bb662c296f889885613720a /src/libmime/message.c
parentfd4dfe5811892f379a5bd3d96407731edb2e5e1c (diff)
downloadrspamd-94b191253638b84e78d4dbf9ce0321674a52e3ca.tar.gz
rspamd-94b191253638b84e78d4dbf9ce0321674a52e3ca.zip
Fix received headers parsing.
Diffstat (limited to 'src/libmime/message.c')
-rw-r--r--src/libmime/message.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libmime/message.c b/src/libmime/message.c
index 8143469a3..56fa85333 100644
--- a/src/libmime/message.c
+++ b/src/libmime/message.c
@@ -1729,7 +1729,7 @@ rspamd_message_parse (struct rspamd_task *task)
}
/* Extract data from received header if we were not given IP */
- if (task->received && (task->flags & RSPAMD_TASK_FLAG_NO_IP)) {
+ if (task->received->len > 0 && (task->flags & RSPAMD_TASK_FLAG_NO_IP)) {
recv = g_ptr_array_index (task->received, 0);
if (recv->real_ip) {
if (!rspamd_parse_inet_address (&task->from_addr, recv->real_ip)) {