From: Geoff Thorpe Date: Thu, 17 Jun 2004 22:05:40 +0000 (+0000) Subject: Actually, that last change to BN_get_word() was a little too simple. X-Git-Tag: BEN_FIPS_TEST_6~14^2~197 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=afbe74d386d2858e5e9c5839af56daa729172229;p=oweals%2Fopenssl.git Actually, that last change to BN_get_word() was a little too simple. --- diff --git a/crypto/bn/bn_lib.c b/crypto/bn/bn_lib.c index 8aa817dfc6..bbc359cb78 100644 --- a/crypto/bn/bn_lib.c +++ b/crypto/bn/bn_lib.c @@ -618,8 +618,10 @@ BN_ULONG BN_get_word(const BIGNUM *a) { if (a->top > 1) return BN_MASK2; - else + else if (a->top == 1) return a->d[0]; + /* a->top == 0 */ + return 0; } int BN_set_word(BIGNUM *a, BN_ULONG w)