allow key agreement for SSL/TLS certificates
[openssl.git] / crypto / bn / bn_gf2m.c
index 2cd93ddc76cf3bdadccd5640606fa5ceb6f82ba0..0bfb56971e3362eadbe248864dea15f30eefd6c6 100644 (file)
@@ -525,7 +525,7 @@ err:
  */
 int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
        {
-       BIGNUM *b, *c, *u, *v, *tmp;
+       BIGNUM *b, *c = NULL, *u = NULL, *v = NULL, *tmp;
        int ret = 0;
 
        bn_check_top(a);
@@ -646,6 +646,8 @@ int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
 err:
 #ifdef BN_DEBUG /* BN_CTX_end would complain about the expanded form */
         bn_correct_top(c);
+        bn_correct_top(u);
+        bn_correct_top(v);
 #endif
        BN_CTX_end(ctx);
        return ret;