diff options
author | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2001-08-11 05:27:00 +0000 |
---|---|---|
committer | Angelos D. Keromytis <angelos@cvs.openbsd.org> | 2001-08-11 05:27:00 +0000 |
commit | 07df893e5b9628c40bf37a795d7323bae4a97418 (patch) | |
tree | de850ebe5bc30f5239c16f3f1cc66a510a4e67b7 /sbin/isakmpd | |
parent | df2071e0e078dc66d8400641eab5b68f3754eb1b (diff) |
Allocate slightly larger buffer for cert.
Diffstat (limited to 'sbin/isakmpd')
-rw-r--r-- | sbin/isakmpd/policy.c | 4 |
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", |