Initialise ctx to NULL to avoid uninitialized free, noticed by
authorMark J. Cox <mark@openssl.org>
Fri, 29 Sep 2006 08:21:41 +0000 (08:21 +0000)
committerMark J. Cox <mark@openssl.org>
Fri, 29 Sep 2006 08:21:41 +0000 (08:21 +0000)
Steve Kiernan

crypto/dh/dh_key.c

index cb5abdc..37a2c1b 100644 (file)
@@ -173,7 +173,7 @@ err:
 
 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;