From: Matt Caswell Date: Mon, 11 Oct 2021 12:43:19 +0000 (+0100) Subject: Fix acvp_test sig_gen X-Git-Tag: openssl-3.2.0-alpha1~3447 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1b327433e52c8acd6db0a69bc772d4bd1800a109;p=thirdparty%2Fopenssl.git Fix acvp_test sig_gen Ensure we set the size of the signature buffer before we call EVP_DigestSign() Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/16789) --- diff --git a/test/acvp_test.c b/test/acvp_test.c index 0e2d54dab6b..10621c3e48c 100644 --- a/test/acvp_test.c +++ b/test/acvp_test.c @@ -94,6 +94,7 @@ static int sig_gen(EVP_PKEY *pkey, OSSL_PARAM *params, const char *digest_name, size_t sig_len; size_t sz = EVP_PKEY_get_size(pkey); + sig_len = sz; if (!TEST_ptr(sig = OPENSSL_malloc(sz)) || !TEST_ptr(md_ctx = EVP_MD_CTX_new()) || !TEST_int_eq(EVP_DigestSignInit_ex(md_ctx, NULL, digest_name, libctx,