diff options
author | Pauli <pauli@openssl.org> | 2021-06-25 09:28:26 +1000 |
---|---|---|
committer | Pauli <pauli@openssl.org> | 2021-06-26 11:32:38 +1000 |
commit | d4af922c583ce152f7d8f35869ab92d5b37cbfd2 (patch) | |
tree | 5651ee2bb7fb7f1c0d213b688ca8bda98bcbfeeb /apps/req.c | |
parent | a31350c07caeae4a2537a725bce15ecb1d262c53 (diff) |
apps: properly initialise arguments to EVP_PKEY_get_bn_param()
This avoids use of uninitialised memory.
Follow on to #15900
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15908)
Diffstat (limited to 'apps/req.c')
-rw-r--r-- | apps/req.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/req.c b/apps/req.c index 9fbe4e250f..d0c620438b 100644 --- a/apps/req.c +++ b/apps/req.c @@ -994,7 +994,7 @@ int req_main(int argc, char **argv) } fprintf(stdout, "Modulus="); if (EVP_PKEY_is_a(tpubkey, "RSA")) { - BIGNUM *n; + BIGNUM *n = NULL; /* Every RSA key has an 'n' */ EVP_PKEY_get_bn_param(pkey, "n", &n); |