From 4d227dd736e57cf75f2278d8117f44dcb3defa61 Mon Sep 17 00:00:00 2001 From: "Simon L. B. Nielsen" Date: Sun, 1 Oct 2006 08:09:46 +0000 Subject: [PATCH] Import from upstream OpenSSL 0.9.8 branch: Fix uninitialized free of ctx in compute_key() when the OPENSSL_DH_MAX_MODULUS_BITS check is triggered. This fixes the same issue as FreeBSD-SA-06:23.openssl v1.1. --- crypto/openssl/crypto/dh/dh_key.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/openssl/crypto/dh/dh_key.c b/crypto/openssl/crypto/dh/dh_key.c index cb5abdcf47c4..37a2c1bca23f 100644 --- a/crypto/openssl/crypto/dh/dh_key.c +++ b/crypto/openssl/crypto/dh/dh_key.c @@ -173,7 +173,7 @@ static int generate_key(DH *dh) static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) { - BN_CTX *ctx; + BN_CTX *ctx=NULL; BN_MONT_CTX *mont=NULL; BIGNUM *tmp; int ret= -1;