aboutsummaryrefslogtreecommitdiffstats
path: root/src/libserver/dkim.c
diff options
context:
space:
mode:
authorVsevolod Stakhov <vsevolod@highsecure.ru>2016-01-30 11:32:07 +0100
committerVsevolod Stakhov <vsevolod@highsecure.ru>2016-01-30 11:32:07 +0100
commitff463c609bd364a8090d89a52c4878fa1aef93bd (patch)
tree5ef217f37e5f082b1c3aa7537879f586465dec7a /src/libserver/dkim.c
parent56583a05d4f391afc3a7bb1551be9724a6d7ba72 (diff)
downloadrspamd-ff463c609bd364a8090d89a52c4878fa1aef93bd.tar.gz
rspamd-ff463c609bd364a8090d89a52c4878fa1aef93bd.zip
Fix couple of compiler warnings
Diffstat (limited to 'src/libserver/dkim.c')
-rw-r--r--src/libserver/dkim.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libserver/dkim.c b/src/libserver/dkim.c
index d0691d80b..faf3f0423 100644
--- a/src/libserver/dkim.c
+++ b/src/libserver/dkim.c
@@ -1417,7 +1417,7 @@ rspamd_dkim_canonize_header_simple (rspamd_dkim_context_t *ctx,
gint state = 0, hlen;
gboolean found = FALSE;
GArray *to_sign;
- struct rspamd_dkim_sign_chunk chunk, *elt;
+ struct rspamd_dkim_sign_chunk chunk, *elt = NULL;
gint i;
/* This process is very similar to raw headers processing */
@@ -1523,7 +1523,7 @@ rspamd_dkim_canonize_header_simple (rspamd_dkim_context_t *ctx,
}
}
- if (elt->append_crlf) {
+ if (elt && elt->append_crlf) {
rspamd_dkim_signature_update (ctx, elt->begin, elt->len + 1);
}
else {