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 b848c8cc60f4d69ab60468c3090385318930a40a..3a1d459dd6d29bfce66aa3dd7cfa331cf5e29053 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);