summaryrefslogtreecommitdiffstats
path: root/apps/x509.c
diff options
context:
space:
mode:
authorPauli <pauli@openssl.org>2021-06-25 09:28:26 +1000
committerPauli <pauli@openssl.org>2021-06-26 11:32:38 +1000
commitd4af922c583ce152f7d8f35869ab92d5b37cbfd2 (patch)
tree5651ee2bb7fb7f1c0d213b688ca8bda98bcbfeeb /apps/x509.c
parenta31350c07caeae4a2537a725bce15ecb1d262c53 (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/x509.c')
-rw-r--r--apps/x509.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apps/x509.c b/apps/x509.c
index 558351ba30..b68530fb22 100644
--- a/apps/x509.c
+++ b/apps/x509.c
@@ -950,7 +950,7 @@ int x509_main(int argc, char **argv)
BN_print(out, n);
BN_free(n);
} else if (EVP_PKEY_is_a(pkey, "DSA")) {
- BIGNUM *dsapub;
+ BIGNUM *dsapub = NULL;
/* Every DSA key has a 'pub' */
EVP_PKEY_get_bn_param(pkey, "pub", &dsapub);