Check t too.
authorDr. Stephen Henson <steve@openssl.org>
Wed, 17 Jun 2009 11:47:54 +0000 (11:47 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Wed, 17 Jun 2009 11:47:54 +0000 (11:47 +0000)
crypto/bn/bn_mul.c

index b848c8c..3a1d459 100644 (file)
@@ -1028,6 +1028,8 @@ int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
                        assert(j <= al || j <= bl);
                        k = j+j;
                        t = BN_CTX_get(ctx);
+                       if (t == NULL)
+                               goto err;
                        if (al > j || bl > j)
                                {
                                bn_wexpand(t,k*4);