[openssl-commits] [openssl] OpenSSL_1_0_2-stable update
Kurt Roeckx
kurt at openssl.org
Thu Oct 29 19:41:07 UTC 2015
The branch OpenSSL_1_0_2-stable has been updated
via dfb23a5ac80bb9a74bd1f44a90ccff54bc3a8c31 (commit)
from b62a2f8a373d1889672599834acf95161f2883ce (commit)
- Log -----------------------------------------------------------------
commit dfb23a5ac80bb9a74bd1f44a90ccff54bc3a8c31
Author: Pascal Cuoq <cuoq at trust-in-soft.com>
Date: Mon Oct 12 12:19:19 2015 +0200
BN_GF2m_mod_inv(): check bn_wexpand return value
Signed-off-by: Kurt Roeckx <kurt at roeckx.be>
Reviewed-by: Rich Salz <rsalz at akamai.com>
MR #1276, RT #4107
(cherry picked from commit 94b3664a528258df5ebcaae213d19bf6568cc47d)
-----------------------------------------------------------------------
Summary of changes:
crypto/bn/bn_gf2m.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/crypto/bn/bn_gf2m.c b/crypto/bn/bn_gf2m.c
index e48ca95..2c61da1 100644
--- a/crypto/bn/bn_gf2m.c
+++ b/crypto/bn/bn_gf2m.c
@@ -699,18 +699,21 @@ int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
int top = p->top;
BN_ULONG *udp, *bdp, *vdp, *cdp;
- bn_wexpand(u, top);
+ if (!bn_wexpand(u, top))
+ goto err;
udp = u->d;
for (i = u->top; i < top; i++)
udp[i] = 0;
u->top = top;
- bn_wexpand(b, top);
+ if (!bn_wexpand(b, top))
+ goto err;
bdp = b->d;
bdp[0] = 1;
for (i = 1; i < top; i++)
bdp[i] = 0;
b->top = top;
- bn_wexpand(c, top);
+ if (!bn_wexpand(c, top))
+ goto err;
cdp = c->d;
for (i = 0; i < top; i++)
cdp[i] = 0;
More information about the openssl-commits
mailing list