diff options
author | 2001-08-11 05:26:59 +0000 | |
---|---|---|
committer | 2001-08-11 05:26:59 +0000 | |
commit | dce9f5c527794ebb4646b19b1a83b07ceaa46cc9 (patch) | |
tree | e054515d2a2773b8d0030bc4de2b2c9e1b558073 | |
parent | GC some unused malloc types. (diff) | |
download | wireguard-openbsd-dce9f5c527794ebb4646b19b1a83b07ceaa46cc9.tar.xz wireguard-openbsd-dce9f5c527794ebb4646b19b1a83b07ceaa46cc9.zip |
Allocate slightly larger buffer for cert.
-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", |