]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
Fix received headers parsing.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 13 Jul 2015 23:09:30 +0000 (00:09 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Mon, 13 Jul 2015 23:09:30 +0000 (00:09 +0100)
src/libmime/message.c

index 8143469a341c8c606b0ed0952313d1938cc50bb0..56fa85333861e74836406f0f8ad36b2c569c8a8d 100644 (file)
@@ -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)) {