diff options
author | Nicola Tuveri <nicola.tuveri@ibm.com> | 2020-05-19 19:36:44 +0200 |
---|---|---|
committer | Nicola Tuveri <nic.tuv@gmail.com> | 2020-05-22 15:35:21 +0200 |
commit | 2de64666a07cccf8477e6483de62ae31f463df64 (patch) | |
tree | fbed08dcd12d6a7db9868b57643055701fd91df6 /crypto | |
parent | e12813d0d31f4f7be2ccc592d382ef3e94bdb842 (diff) | |
download | openssl-2de64666a07cccf8477e6483de62ae31f463df64.zip openssl-2de64666a07cccf8477e6483de62ae31f463df64.tar.gz openssl-2de64666a07cccf8477e6483de62ae31f463df64.tar.bz2 |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/x509/v3_alt.c b/crypto/x509/v3_alt.c index 5fece4f..dd45546 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) { |