]> 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)
committerVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 30 Dec 2016 17:53:56 +0000 (17:53 +0000)
MFH: true

src/libserver/dkim.c

index 3a9dff80ca38d5532624231b60a48921fbef9ac1..4740ebccda6e084598f203df77d4f863da33ccef 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);