From ba048f14b194170c8163b24993f486d573a48703 Mon Sep 17 00:00:00 2001 From: Samuel Chiang Date: Tue, 17 Sep 2024 13:10:38 -0700 Subject: [PATCH] Update crypto/pem/pem_pkey.c Co-authored-by: Will Childs-Klein --- crypto/pem/pem_pkey.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/pem/pem_pkey.c b/crypto/pem/pem_pkey.c index 366337b595..796bf693c6 100644 --- a/crypto/pem/pem_pkey.c +++ b/crypto/pem/pem_pkey.c @@ -274,7 +274,7 @@ int PEM_write_bio_PrivateKey_traditional(BIO *bp, EVP_PKEY *x, return 0; } char pem_str[80]; - BIO_snprintf(pem_str, 80, "%s PRIVATE KEY", x->ameth->pem_str); + BIO_snprintf(pem_str, sizeof(pem_str), "%s PRIVATE KEY", x->ameth->pem_str); return PEM_ASN1_write_bio(i2d_PrivateKey_void, pem_str, bp, x, enc, kstr, klen, cb, u); }