]> git.ipfire.org Git - thirdparty/rspamd.git/commitdiff
[Fix] Fix checking of DKIM bodies that needs just `\n` to be added
authorVsevolod Stakhov <vsevolod@highsecure.ru>
Fri, 30 Dec 2016 16:56:26 +0000 (16:56 +0000)
committerAndrew Lewis <nerf@judo.za.org>
Tue, 3 Jan 2017 13:38:37 +0000 (15:38 +0200)
src/libserver/dkim.c

index b815c7c81d3aad4fe246be56d387b41939cff8e0..ff583460cbec8bf6dd43156fb710b0366a278659 100644 (file)
@@ -1869,7 +1869,7 @@ rspamd_dkim_check (rspamd_dkim_context_t *ctx,
                        EVP_MD_CTX_reset (cpy_ctx);
        #endif
                        EVP_MD_CTX_copy (cpy_ctx, ctx->common.body_hash);
-                       EVP_DigestUpdate (cpy_ctx, "\n", 2);
+                       EVP_DigestUpdate (cpy_ctx, "\n", 1);
                        EVP_DigestFinal_ex (cpy_ctx, raw_digest, NULL);
 
                        if (memcmp (ctx->bh, raw_digest, ctx->bhlen) != 0) {