From ab42bd23609158bd5c00e3e4bd02535a3d9af5af Mon Sep 17 00:00:00 2001 From: Tom Kistner Date: Sun, 5 Jun 2011 17:08:36 +0100 Subject: DKIM Verification: Fix relaxed canon for empty headers w/o whitespace trailer --- src/src/pdkim/pdkim.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; -- cgit v1.2.3