Fix crash in BN_rshift.
authorAndy Polyakov <appro@openssl.org>
Tue, 28 Oct 2008 13:46:14 +0000 (13:46 +0000)
committerAndy Polyakov <appro@openssl.org>
Tue, 28 Oct 2008 13:46:14 +0000 (13:46 +0000)
PR: 1663

crypto/bn/bn_shift.c

index de9312d..c4d301a 100644 (file)
@@ -177,7 +177,7 @@ int BN_rshift(BIGNUM *r, const BIGNUM *a, int n)
        nw=n/BN_BITS2;
        rb=n%BN_BITS2;
        lb=BN_BITS2-rb;
-       if (nw > a->top || a->top == 0)
+       if (nw >= a->top || a->top == 0)
                {
                BN_zero(r);
                return(1);