diff options
author | Nigel Metheringham <nigel@exim.org> | 2010-05-29 19:14:06 +0000 |
---|---|---|
committer | Nigel Metheringham <nigel@exim.org> | 2010-05-29 19:14:06 +0000 |
commit | 13f492fcacb2398c89bead957364fe4fee8cfd24 (patch) | |
tree | f5c144d835c9b918772f462ca8fd5c69667ccd92 /src | |
parent | 8fd6966ba6755433b257a91a3012a6f3674bf812 (diff) | |
download | exim4-13f492fcacb2398c89bead957364fe4fee8cfd24.tar.gz |
Null terminate pdkim string. Fixes: #985
Diffstat (limited to 'src')
-rw-r--r-- | src/src/pdkim/pdkim.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 <stdlib.h> #include <stdio.h> @@ -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) { |