From: Nigel Metheringham Date: Sat, 29 May 2010 19:14:06 +0000 (+0000) Subject: Null terminate pdkim string. Fixes: #985 X-Git-Tag: exim-4_72_RC2~5 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=13f492fcacb2398c89bead957364fe4fee8cfd24;p=exim.git Null terminate pdkim string. Fixes: #985 --- diff --git a/src/src/pdkim/pdkim.c b/src/src/pdkim/pdkim.c index 3385fecc8..fa5d88d59 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.13 2010/05/29 18:59:18 nm4 Exp $ */ +/* $Cambridge: exim/src/src/pdkim/pdkim.c,v 1.14 2010/05/29 19:14:06 nm4 Exp $ */ #include #include @@ -211,6 +211,7 @@ pdkim_str *pdkim_strnew (char *cstr) { p->allocated=(len+1); p->len=len; if (cstr) strcpy(p->str,cstr); + else p->str[p->len] = '\0'; return p; } char *pdkim_strncat(pdkim_str *str, char *data, int len) {