Pointer to BN_MONT_CTX could be used uninitialized.

This commit is contained in:
Andy Polyakov 2005-04-28 08:49:01 +00:00
parent ff8bcccdd4
commit 3cc54008eb

View File

@ -104,7 +104,7 @@ static int generate_key(DH *dh)
int generate_new_key=0; int generate_new_key=0;
unsigned l; unsigned l;
BN_CTX *ctx; BN_CTX *ctx;
BN_MONT_CTX *mont; BN_MONT_CTX *mont=NULL;
BIGNUM *pub_key=NULL,*priv_key=NULL; BIGNUM *pub_key=NULL,*priv_key=NULL;
ctx = BN_CTX_new(); ctx = BN_CTX_new();
@ -160,7 +160,7 @@ err:
static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh) static int compute_key(unsigned char *key, const BIGNUM *pub_key, DH *dh)
{ {
BN_CTX *ctx; BN_CTX *ctx;
BN_MONT_CTX *mont; BN_MONT_CTX *mont=NULL;
BIGNUM *tmp; BIGNUM *tmp;
int ret= -1; int ret= -1;