diff options
Diffstat (limited to 'src/lib/libcrypto')
| -rw-r--r-- | src/lib/libcrypto/pem/pem_pkey.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/libcrypto/pem/pem_pkey.c b/src/lib/libcrypto/pem/pem_pkey.c index c8cf00dd87..5274447b24 100644 --- a/src/lib/libcrypto/pem/pem_pkey.c +++ b/src/lib/libcrypto/pem/pem_pkey.c | |||
| @@ -147,7 +147,8 @@ int PEM_write_bio_PrivateKey(BIO *bp, EVP_PKEY *x, const EVP_CIPHER *enc, | |||
| 147 | (char *)kstr, klen, | 147 | (char *)kstr, klen, |
| 148 | cb, u); | 148 | cb, u); |
| 149 | 149 | ||
| 150 | snprintf(pem_str, 80, "%s PRIVATE KEY", x->ameth->pem_str); | 150 | (void) snprintf(pem_str, sizeof(pem_str), "%s PRIVATE KEY", |
| 151 | x->ameth->pem_str); | ||
| 151 | return PEM_ASN1_write_bio((i2d_of_void *)i2d_PrivateKey, | 152 | return PEM_ASN1_write_bio((i2d_of_void *)i2d_PrivateKey, |
| 152 | pem_str,bp,x,enc,kstr,klen,cb,u); | 153 | pem_str,bp,x,enc,kstr,klen,cb,u); |
| 153 | } | 154 | } |
| @@ -199,7 +200,8 @@ int PEM_write_bio_Parameters(BIO *bp, EVP_PKEY *x) | |||
| 199 | if (!x->ameth || !x->ameth->param_encode) | 200 | if (!x->ameth || !x->ameth->param_encode) |
| 200 | return 0; | 201 | return 0; |
| 201 | 202 | ||
| 202 | snprintf(pem_str, 80, "%s PARAMETERS", x->ameth->pem_str); | 203 | (void) snprintf(pem_str, sizeof(pem_str), "%s PARAMETERS", |
| 204 | x->ameth->pem_str); | ||
| 203 | return PEM_ASN1_write_bio( | 205 | return PEM_ASN1_write_bio( |
| 204 | (i2d_of_void *)x->ameth->param_encode, | 206 | (i2d_of_void *)x->ameth->param_encode, |
| 205 | pem_str,bp,x,NULL,NULL,0,0,NULL); | 207 | pem_str,bp,x,NULL,NULL,0,0,NULL); |
