diff options
author | Richard Levitte <levitte@openssl.org> | 2003-12-27 14:40:17 +0000 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2003-12-27 14:40:17 +0000 |
commit | d420ac2c7d4ba9d99ff2c257a3ad71ecc6d876e2 (patch) | |
tree | 84414c7d794c6286588d2042f060036378311348 /crypto/asn1/t_pkey.c | |
parent | b79aa47a0c8478bea62fc2bb55f99e0be172da3d (diff) | |
download | openssl-d420ac2c7d4ba9d99ff2c257a3ad71ecc6d876e2.tar.gz |
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 <markus@openbsd.org>
Diffstat (limited to 'crypto/asn1/t_pkey.c')
-rw-r--r-- | crypto/asn1/t_pkey.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/asn1/t_pkey.c b/crypto/asn1/t_pkey.c index 06e85f3b4c..86bd2e04e4 100644 --- a/crypto/asn1/t_pkey.c +++ b/crypto/asn1/t_pkey.c @@ -150,9 +150,9 @@ int RSA_print(BIO *bp, const RSA *x, int off) } if (x->d == NULL) - sprintf(str,"Modulus (%d bit):",BN_num_bits(x->n)); + BIO_snprintf(str,sizeof str,"Modulus (%d bit):",BN_num_bits(x->n)); else - strcpy(str,"modulus:"); + BUF_strlcpy(str,"modulus:",sizeof str); if (!print(bp,str,x->n,m,off)) goto err; s=(x->d == NULL)?"Exponent:":"publicExponent:"; if (!print(bp,s,x->e,m,off)) goto err; |