From 6a6da81d2b764ec7aefeb02fdeb0d05351dde80a Mon Sep 17 00:00:00 2001 From: Vsevolod Stakhov Date: Sun, 5 Jan 2014 20:23:51 +0000 Subject: [PATCH] Fix headers end detection for DKIM. --- src/dkim.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/dkim.c b/src/dkim.c index d864165ac..e40c6969e 100644 --- a/src/dkim.c +++ b/src/dkim.c @@ -1401,10 +1401,10 @@ rspamd_dkim_check (rspamd_dkim_context_t *ctx, rspamd_dkim_key_t *key, struct wo headers_end = p + 1; break; } - else if (got_lf && *(p - 1) == '\n') { - /* \n\r case */ - headers_end = p + 1; - break; + else if (got_lf && *(p - 1) != '\n') { + /* Sequence is broken */ + got_lf = FALSE; + got_cr = TRUE; } else { got_cr = TRUE; -- 2.39.5