diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-04-30 15:28:04 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2015-04-30 15:28:04 +0000 |
commit | e5e18699a9cabb5d0a4510e5714bc2e65f1f93df (patch) | |
tree | cad38dda04d5bbebd2ded969453313a65297675a /lib/libcrypto/conf | |
parent | ae19cf9ad6c30fa756a52daae9a12306d53f28b9 (diff) |
use strdup() to init string
ok doug millert
Diffstat (limited to 'lib/libcrypto/conf')
-rw-r--r-- | lib/libcrypto/conf/conf_def.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/libcrypto/conf/conf_def.c b/lib/libcrypto/conf/conf_def.c index e608e5fe9d9..5526fa5c039 100644 --- a/lib/libcrypto/conf/conf_def.c +++ b/lib/libcrypto/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); |