From 0904e79a6e6109240d5a552f2699408b26cf63ee Mon Sep 17 00:00:00 2001 From: Rich Salz Date: Wed, 14 Jun 2017 20:34:37 -0400 Subject: Undo commit d420ac2 [extended tests] Original text: Use BUF_strlcpy() instead of strcpy(). Use BUF_strlcat() instead of strcat(). Use BIO_snprintf() instead of sprintf(). In some cases, keep better track of buffer lengths. This is part of a large change submitted by Markus Friedl Reviewed-by: Tim Hudson Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/3701) --- crypto/conf/conf_def.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crypto/conf/conf_def.c') diff --git a/crypto/conf/conf_def.c b/crypto/conf/conf_def.c index a7b11d1598..78acdec4f6 100644 --- a/crypto/conf/conf_def.c +++ b/crypto/conf/conf_def.c @@ -323,7 +323,7 @@ static int def_load_bio(CONF *conf, BIO *in, long *line) CONFerr(CONF_F_DEF_LOAD_BIO, ERR_R_MALLOC_FAILURE); goto err; } - OPENSSL_strlcpy(v->name, pname, strlen(pname) + 1); + strcpy(v->name, pname); if (!str_copy(conf, psection, &(v->value), start)) goto err; @@ -353,7 +353,7 @@ static int def_load_bio(CONF *conf, BIO *in, long *line) OPENSSL_free(section); if (line != NULL) *line = eline; - BIO_snprintf(btmp, sizeof btmp, "%ld", eline); + sprintf(btmp, "%ld", eline); ERR_add_error_data(2, "line ", btmp); if (h != conf->data) { CONF_free(conf->data); -- cgit v1.2.3