]> source.dussan.org Git - rspamd.git/commitdiff
[CritFix] Deal with absent headers in DKIM
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 30 Dec 2016 17:53:07 +0000 (17:53 +0000)
committerAndrew Lewis <nerf@judo.za.org>
Tue, 3 Jan 2017 13:41:04 +0000 (15:41 +0200)
MFH: true

src/libserver/dkim.c

index eab0749367c6880d2fa5095dedffe3f97a2f2a01..20750eefeddceb7ae588452cfdd627355090395e 100644 (file)
@@ -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);