summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeoff Thorpe <geoff@openssl.org>2004-06-17 22:05:40 +0000
committerGeoff Thorpe <geoff@openssl.org>2004-06-17 22:05:40 +0000
commitafbe74d386d2858e5e9c5839af56daa729172229 (patch)
treee723d57836d2e926ac3d74ee459847f0d06a2418
parentf18ea6cae92d0529de521b9c0a79f2846e1b4c29 (diff)
downloadopenssl-new-afbe74d386d2858e5e9c5839af56daa729172229.tar.gz
Actually, that last change to BN_get_word() was a little too simple.
-rw-r--r--crypto/bn/bn_lib.c4
1 files changed, 3 insertions, 1 deletions
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)