From a33de30073bfa0ee1abba186dba9fa52cf0aa23a Mon Sep 17 00:00:00 2001 From: marha Date: Fri, 15 Jun 2012 14:04:46 +0200 Subject: Updated to following packages: freetype-2.4.10 libXaw-1.0.11 openssl-1.0.1c --- openssl/crypto/bn/bn_gf2m.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'openssl/crypto/bn/bn_gf2m.c') diff --git a/openssl/crypto/bn/bn_gf2m.c b/openssl/crypto/bn/bn_gf2m.c index 08ab9fd22..8a4dc20ad 100644 --- a/openssl/crypto/bn/bn_gf2m.c +++ b/openssl/crypto/bn/bn_gf2m.c @@ -628,8 +628,11 @@ int BN_GF2m_mod_inv(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) } if (ubits==vbits) { - bn_correct_top(u); - ubits = BN_num_bits(u); + BN_ULONG ul; + int utop = (ubits-1)/BN_BITS2; + + while ((ul=udp[utop])==0 && utop) utop--; + ubits = utop*BN_BITS2 + BN_num_bits_word(ul); } } bn_correct_top(b); -- cgit v1.2.3