summaryrefslogtreecommitdiffstats
path: root/lib/libssl/src
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>2015-04-30 15:28:03 +0000
committerderaadt <deraadt@openbsd.org>2015-04-30 15:28:03 +0000
commita5a50915754e1a4190e23248c37127d8a27986e8 (patch)
tree420c2ed5fe1dccf06cc79a3e8203227143e7368a /lib/libssl/src
parentDo not free & reallocate a new chunk of memory for the interface (diff)
downloadwireguard-openbsd-a5a50915754e1a4190e23248c37127d8a27986e8.tar.xz
wireguard-openbsd-a5a50915754e1a4190e23248c37127d8a27986e8.zip
use strdup() to init string
ok doug millert
Diffstat (limited to 'lib/libssl/src')
-rw-r--r--lib/libssl/src/crypto/conf/conf_def.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libssl/src/crypto/conf/conf_def.c b/lib/libssl/src/crypto/conf/conf_def.c
index e608e5fe9d9..5526fa5c039 100644
--- a/lib/libssl/src/crypto/conf/conf_def.c
+++ b/lib/libssl/src/crypto/conf/conf_def.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: conf_def.c,v 1.29 2015/02/07 13:19:15 doug Exp $ */
+/* $OpenBSD: conf_def.c,v 1.30 2015/04/30 15:28:03 deraadt Exp $ */
/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
* All rights reserved.
*
@@ -228,12 +228,11 @@ def_load_bio(CONF *conf, BIO *in, long *line)
goto err;
}
- section = malloc(10);
+ section = strdup("default");
if (section == NULL) {
CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_MALLOC_FAILURE);
goto err;
}
- strlcpy(section, "default",10);
if (_CONF_new_data(conf) == 0) {
CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_MALLOC_FAILURE);