PR: 2111
authorDr. Stephen Henson <steve@openssl.org>
Wed, 2 Dec 2009 15:27:19 +0000 (15:27 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Wed, 2 Dec 2009 15:27:19 +0000 (15:27 +0000)
Submitted by: Martin Olsson <molsson@opera.com>

Check for bn_wexpand errors in bn_mul.c

CHANGES
crypto/bn/bn_mul.c

diff --git a/CHANGES b/CHANGES
index 9be6da957d60d92a32ee4a04470ba88ee15c02e6..f3a96cc160da770d1b02cf1c5ab051faa50a4465 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -4,6 +4,10 @@
 
  Changes between 0.9.8l (?) and 0.9.8m (?)  [xx XXX xxxx]
 
+  *) Replace the highly broken and deprecated SPKAC certification method with
+     the updated NID creation version. This should correctly handle UTF8.
+     [Steve Henson]
+
   *) Implement
      https://svn.resiprocate.org/rep/ietf-drafts/ekr/draft-rescorla-tls-renegotiate.txt. Re-enable
      renegotiation but require the extension as needed. Unfortunately,
index 3a1d459dd6d29bfce66aa3dd7cfa331cf5e29053..a0e9ec3b4694cb896a565f2953c56f53eef1da1c 100644 (file)
@@ -1032,15 +1032,15 @@ int BN_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, BN_CTX *ctx)
                                goto err;
                        if (al > j || bl > j)
                                {
-                               bn_wexpand(t,k*4);
-                               bn_wexpand(rr,k*4);
+                               if (bn_wexpand(t,k*4) == NULL) goto err;
+                               if (bn_wexpand(rr,k*4) == NULL) goto err;
                                bn_mul_part_recursive(rr->d,a->d,b->d,
                                        j,al-j,bl-j,t->d);
                                }
                        else    /* al <= j || bl <= j */
                                {
-                               bn_wexpand(t,k*2);
-                               bn_wexpand(rr,k*2);
+                               if (bn_wexpand(t,k*2) == NULL) goto err;
+                               if (bn_wexpand(rr,k*2) == NULL) goto err;
                                bn_mul_recursive(rr->d,a->d,b->d,
                                        j,al-j,bl-j,t->d);
                                }