Commit 0a2dcb69 authored by Richard Levitte's avatar Richard Levitte
Browse files

bn: fix occurance of negative zero in BN_rshift1()



Reviewed-by: default avatarRich Salz <rsalz@openssl.org>
parent 38d1b3cc
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -74,6 +74,8 @@ int BN_rshift1(BIGNUM *r, const BIGNUM *a)
        c = (t & 1) ? BN_TBIT : 0;
        c = (t & 1) ? BN_TBIT : 0;
    }
    }
    r->top = j;
    r->top = j;
    if (!r->top)
        r->neg = 0; /* don't allow negative zero */
    bn_check_top(r);
    bn_check_top(r);
    return (1);
    return (1);
}
}