From: Bodo Möller Date: Tue, 13 Jun 2000 15:07:39 +0000 (+0000) Subject: This probably fixes a BN_rshift bug. X-Git-Tag: OpenSSL-engine-0_9_6-beta1~21^2~63 X-Git-Url: https://git.openssl.org/gitweb/?a=commitdiff_plain;ds=inline;h=24bec03beb1d97f7c7b3f0066f3a309800de435f;p=openssl.git This probably fixes a BN_rshift bug. --- 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);