From: Pauli Date: Thu, 18 Mar 2021 22:22:43 +0000 (+1000) Subject: evp: fix coverity 1473380: copy into fixed size buffer X-Git-Tag: openssl-3.0.0-alpha14~175 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=abded2ced44b94d96f08ea5cf01df6519b80f5d3;p=thirdparty%2Fopenssl.git evp: fix coverity 1473380: copy into fixed size buffer Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/14614) --- 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); }