From 85723f1bde9d1774728e9318b8e5aa525143059d Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Fri, 30 Dec 2016 17:53:07 +0000 Subject: [PATCH] [CritFix] Deal with absent headers in DKIM MFH: true --- src/libserver/dkim.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/libserver/dkim.c b/src/libserver/dkim.c index eab074936..20750eefe 100644 --- a/src/libserver/dkim.c +++ b/src/libserver/dkim.c @@ -1727,7 +1727,8 @@ rspamd_dkim_canonize_header (struct rspamd_dkim_common_ctx *ctx, rh_num = ar->len - count - 1; } else { - rh_num = ar->len - 1; + /* Absence of header is just NULL signature update */ + return TRUE; } rh = g_ptr_array_index (ar, rh_num); -- 2.39.5