summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNigel Metheringham <nigel@exim.org>2010-05-29 19:14:06 +0000
committerNigel Metheringham <nigel@exim.org>2010-05-29 19:14:06 +0000
commit13f492fcacb2398c89bead957364fe4fee8cfd24 (patch)
treef5c144d835c9b918772f462ca8fd5c69667ccd92 /src
parent8fd6966ba6755433b257a91a3012a6f3674bf812 (diff)
downloadexim4-13f492fcacb2398c89bead957364fe4fee8cfd24.tar.gz
Null terminate pdkim string. Fixes: #985
Diffstat (limited to 'src')
-rw-r--r--src/src/pdkim/pdkim.c3
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) {