From: Tom Kistner Date: Thu, 29 Oct 2009 10:12:28 +0000 (+0000) Subject: DKIM: Fix insufficient buffer space when relaxing one-word headers (One more byte... X-Git-Tag: exim-4_70_RC3~9 X-Git-Url: https://git.exim.org/users/heiko/exim.git/commitdiff_plain/a7921bbed6806997872e3f7b904447d67d5a0cfc?hp=5325967591b73900df0baf1cd0dc9fc56673375e DKIM: Fix insufficient buffer space when relaxing one-word headers (One more byte makes the function look safer) --- diff --git a/src/src/pdkim/pdkim.c b/src/src/pdkim/pdkim.c index 731a1c39f..306e327e5 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.4 2009/10/29 10:02:40 tom Exp $ */ +/* $Cambridge: exim/src/src/pdkim/pdkim.c,v 1.5 2009/10/29 10:12:28 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)+2); + char *relaxed = malloc(strlen(header)+3); if (relaxed == NULL) return NULL; q = relaxed; while (*p != '\0') {