From: Tom Kistner Date: Thu, 29 Oct 2009 10:02:40 +0000 (+0000) Subject: DKIM: Fix insufficient buffer space when relaxing one-word headers. X-Git-Tag: exim-4_70_RC3~10 X-Git-Url: https://git.exim.org/users/heiko/exim.git/commitdiff_plain/5325967591b73900df0baf1cd0dc9fc56673375e?hp=71e1673fc67e46389d29b88b2e8930f5294ea380 DKIM: Fix insufficient buffer space when relaxing one-word headers. --- diff --git a/src/src/pdkim/pdkim.c b/src/src/pdkim/pdkim.c index 55910f994..731a1c39f 100644 --- a/src/src/pdkim/pdkim.c +++ b/src/src/pdkim/pdkim.c @@ -20,7 +20,7 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -/* $Cambridge: exim/src/src/pdkim/pdkim.c,v 1.3 2009/09/09 08:13:58 tom Exp $ */ +/* $Cambridge: exim/src/src/pdkim/pdkim.c,v 1.4 2009/10/29 10:02:40 tom Exp $ */ #include #include @@ -366,7 +366,7 @@ char *pdkim_relax_header (char *header, int crlf) { int seen_wsp = 0; char *p = header; char *q; - char *relaxed = malloc(strlen(header)); + char *relaxed = malloc(strlen(header)+2); if (relaxed == NULL) return NULL; q = relaxed; while (*p != '\0') {