From: Tom Kistner Date: Sun, 5 Jun 2011 16:08:36 +0000 (+0100) Subject: DKIM Verification: Fix relaxed canon for empty headers w/o X-Git-Tag: list_safety_merge_proposal~26 X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/ab42bd23609158bd5c00e3e4bd02535a3d9af5af DKIM Verification: Fix relaxed canon for empty headers w/o whitespace trailer --- diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog index e782b9ee3..dc8e0437d 100644 --- a/doc/doc-txt/ChangeLog +++ b/doc/doc-txt/ChangeLog @@ -11,6 +11,8 @@ PP/01 Solaris build fix for Oracle's LDAP libraries. TF/01 HP/UX build fix: avoid arithmetic on a void pointer. +TK/01 DKIM Verification: Fix relaxed canon for empty headers w/o + whitespace trailer Exim version 4.76 ----------------- diff --git a/src/src/pdkim/pdkim.c b/src/src/pdkim/pdkim.c index 59ac39569..5960292d4 100644 --- a/src/src/pdkim/pdkim.c +++ b/src/src/pdkim/pdkim.c @@ -420,7 +420,7 @@ char *pdkim_relax_header (char *header, int crlf) { p++; q++; } - if (seen_wsp) q--; + if ((q>relaxed) && (*(q-1) == ' ')) q--; /* Squash eventual trailing SP */ *q = '\0'; if (crlf) strcat(relaxed,"\r\n"); return relaxed;