summaryrefslogtreecommitdiffstats
path: root/crypto/openssl/crypto/bn/bn_shift.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/openssl/crypto/bn/bn_shift.c')
-rw-r--r--crypto/openssl/crypto/bn/bn_shift.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/openssl/crypto/bn/bn_shift.c b/crypto/openssl/crypto/bn/bn_shift.c
index 61aae65..0883247 100644
--- a/crypto/openssl/crypto/bn/bn_shift.c
+++ b/crypto/openssl/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);
OpenPOWER on IntegriCloud