From a7921bbed6806997872e3f7b904447d67d5a0cfc Mon Sep 17 00:00:00 2001 From: Tom Kistner Date: Thu, 29 Oct 2009 10:12:28 +0000 Subject: [PATCH 1/1] DKIM: Fix insufficient buffer space when relaxing one-word headers (One more byte makes the function look safer) --- src/src/pdkim/pdkim.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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') { -- 2.30.2