From afbe74d386d2858e5e9c5839af56daa729172229 Mon Sep 17 00:00:00 2001 From: Geoff Thorpe Date: Thu, 17 Jun 2004 22:05:40 +0000 Subject: [PATCH] Actually, that last change to BN_get_word() was a little too simple. --- crypto/bn/bn_lib.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- 2.34.1