]> source.dussan.org Git - rspamd.git/commitdiff
Fix received headers parsing.
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 5 Sep 2014 15:15:03 +0000 (16:15 +0100)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 5 Sep 2014 15:15:03 +0000 (16:15 +0100)
src/libmime/message.c

index a1bc2d25f5663f56f27788ed25094e9466c0eafe..fff55b4fe62202d3ee0067b0376718a7e9671e03 100644 (file)
@@ -313,10 +313,11 @@ parse_qmail_recv (rspamd_mempool_t * pool,
 
 static void
 parse_recv_header (rspamd_mempool_t * pool,
-       gchar *line,
+       struct raw_header *rh,
        struct received_header *r)
 {
        gchar *p, *s, t, **res = NULL;
+       gchar *line;
        enum {
                RSPAMD_RECV_STATE_INIT = 0,
                RSPAMD_RECV_STATE_FROM,
@@ -330,6 +331,11 @@ parse_recv_header (rspamd_mempool_t * pool,
                next_state = RSPAMD_RECV_STATE_INIT;
        gboolean is_exim = FALSE;
 
+       line = rh->decoded;
+       if (line == NULL) {
+               return;
+       }
+
        g_strstrip (line);
        p = line;
        s = line;