Pointer to BN_MONT_CTX could be used uninitialized.
authorAndy Polyakov <appro@openssl.org>
Thu, 28 Apr 2005 08:49:01 +0000 (08:49 +0000)
committerAndy Polyakov <appro@openssl.org>
Thu, 28 Apr 2005 08:49:01 +0000 (08:49 +0000)
crypto/dh/dh_key.c

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