summaryrefslogtreecommitdiffstats
path: root/crypto
diff options
context:
space:
mode:
authorNicola Tuveri <nicola.tuveri@ibm.com>2020-05-19 19:36:44 +0200
committerNicola Tuveri <nic.tuv@gmail.com>2020-05-22 15:35:21 +0200
commit2de64666a07cccf8477e6483de62ae31f463df64 (patch)
treefbed08dcd12d6a7db9868b57643055701fd91df6 /crypto
parente12813d0d31f4f7be2ccc592d382ef3e94bdb842 (diff)
Adjust length of some strncpy() calls
This fixes warnings detected by -Wstringop-truncation. Reviewed-by: Bernd Edlinger <bernd.edlinger@hotmail.de> (Merged from https://github.com/openssl/openssl/pull/11878)
Diffstat (limited to 'crypto')
-rw-r--r--crypto/x509/v3_alt.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/x509/v3_alt.c b/crypto/x509/v3_alt.c
index 5fece4f985..dd45546f6c 100644
--- a/crypto/x509/v3_alt.c
+++ b/crypto/x509/v3_alt.c
@@ -128,7 +128,7 @@ STACK_OF(CONF_VALUE) *i2v_GENERAL_NAME(X509V3_EXT_METHOD *method,
BIO_snprintf(othername, sizeof(othername), "othername: %s:",
oline);
else
- strncpy(othername, "othername:", sizeof(othername));
+ OPENSSL_strlcpy(othername, "othername:", sizeof(othername));
/* check if the value is something printable */
if (gen->d.otherName->value->type == V_ASN1_IA5STRING) {