From abded2ced44b94d96f08ea5cf01df6519b80f5d3 Mon Sep 17 00:00:00 2001 From: Pauli Date: Fri, 19 Mar 2021 08:22:43 +1000 Subject: [PATCH] evp: fix coverity 1473380: copy into fixed size buffer Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/14614) --- crypto/evp/ctrl_params_translate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/evp/ctrl_params_translate.c b/crypto/evp/ctrl_params_translate.c index 808804ab3a9..c13a40a95fb 100644 --- a/crypto/evp/ctrl_params_translate.c +++ b/crypto/evp/ctrl_params_translate.c @@ -1344,7 +1344,7 @@ static int fix_rsa_pss_saltlen(enum state state, break; } if (i == OSSL_NELEM(str_value_map)) { - BIO_snprintf(ctx->name_buf, 5, "%d", ctx->p1); + BIO_snprintf(ctx->name_buf, sizeof(ctx->name_buf), "%d", ctx->p1); } else { strcpy(ctx->name_buf, str_value_map[i].ptr); } -- 2.47.2