diff options
author | Alessandro Ghedini <alessandro@ghedini.me> | 2015-10-08 14:37:21 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2015-10-23 19:52:08 +0200 |
commit | 8acaabec429b39f9436f6a88006384d72d292539 (patch) | |
tree | ed15592c5de2b3a5cd132dddf7d4b447eeee1a18 /crypto/conf | |
parent | 4428c7dba8f6f407d915c1226f4e0f673e8be241 (diff) |
Replace malloc+strlcpy with strdup
Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Diffstat (limited to 'crypto/conf')
-rw-r--r-- | crypto/conf/conf_def.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/crypto/conf/conf_def.c b/crypto/conf/conf_def.c index b4903772e3..1da68f9334 100644 --- a/crypto/conf/conf_def.c +++ b/crypto/conf/conf_def.c @@ -223,12 +223,11 @@ static int def_load_bio(CONF *conf, BIO *in, long *line) goto err; } - section = OPENSSL_malloc(10); + section = BUF_strdup("default"); if (section == NULL) { CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_MALLOC_FAILURE); goto err; } - BUF_strlcpy(section, "default", 10); if (_CONF_new_data(conf) == 0) { CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_MALLOC_FAILURE); |