summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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)