summaryrefslogtreecommitdiff
path: root/sbin/isakmpd
diff options
context:
space:
mode:
authorAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-08-11 05:27:00 +0000
committerAngelos D. Keromytis <angelos@cvs.openbsd.org>2001-08-11 05:27:00 +0000
commit07df893e5b9628c40bf37a795d7323bae4a97418 (patch)
treede850ebe5bc30f5239c16f3f1cc66a510a4e67b7 /sbin/isakmpd
parentdf2071e0e078dc66d8400641eab5b68f3754eb1b (diff)
Allocate slightly larger buffer for cert.
Diffstat (limited to 'sbin/isakmpd')
-rw-r--r--sbin/isakmpd/policy.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sbin/isakmpd/policy.c b/sbin/isakmpd/policy.c
index cfaec21946c..5b60365e165 100644
--- a/sbin/isakmpd/policy.c
+++ b/sbin/isakmpd/policy.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: policy.c,v 1.42 2001/07/05 07:29:59 angelos Exp $ */
+/* $OpenBSD: policy.c,v 1.43 2001/08/11 05:26:59 angelos Exp $ */
/* $EOM: policy.c,v 1.49 2000/10/24 13:33:39 niklas Exp $ */
/*
@@ -2161,7 +2161,7 @@ keynote_cert_obtain (u_int8_t *id, size_t id_len, void *data, u_int8_t **cert,
return 0;
}
- *cert = calloc (sb.st_size, sizeof (char));
+ *cert = calloc (sb.st_size + 1, sizeof (char));
if (*cert == NULL)
{
log_error ("keynote_cert_obtain: failed to allocate %d bytes",