aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2014-09-05 16:15:03 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2014-09-05 16:15:03 +0100
commit2a5d75453b76912160c3709913de34ea1ee7534e (patch)
tree0eeca45bbe68483a6939b1c67e9face0a90daa37
parent84d74c92b1a2936fa62b34bed9394ee0449dd46b (diff)
downloadrspamd-2a5d75453b76912160c3709913de34ea1ee7534e.tar.gz
rspamd-2a5d75453b76912160c3709913de34ea1ee7534e.zip
Fix received headers parsing.
-rw-r--r--src/libmime/message.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/libmime/message.c b/src/libmime/message.c
index a1bc2d25f..fff55b4fe 100644
--- a/src/libmime/message.c
+++ b/src/libmime/message.c
@@ -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;