summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_shift.c
diff options
context:
space:
mode:
authorBodo Möller <bodo@openssl.org>2000-06-13 15:07:39 +0000
committerBodo Möller <bodo@openssl.org>2000-06-13 15:07:39 +0000
commit24bec03beb1d97f7c7b3f0066f3a309800de435f (patch)
tree051d21edf09d68cf0c0f758b9a4d9f5e26969445 /crypto/bn/bn_shift.c
parentc3b1424cc0c61fe0d7c0cdeccc50b001f8f66167 (diff)
This probably fixes a BN_rshift bug.
Diffstat (limited to 'crypto/bn/bn_shift.c')
-rw-r--r--crypto/bn/bn_shift.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/bn/bn_shift.c b/crypto/bn/bn_shift.c
index 61aae65a6b..0883247384 100644
--- a/crypto/bn/bn_shift.c
+++ b/crypto/bn/bn_shift.c
@@ -162,7 +162,7 @@ int BN_rshift(BIGNUM *r, BIGNUM *a, int n)
nw=n/BN_BITS2;
rb=n%BN_BITS2;
lb=BN_BITS2-rb;
- if (nw > a->top)
+ if (nw > a->top || a->top == 0)
{
BN_zero(r);
return(1);