Commit dfb109c5 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>
(cherry picked from commit 0a2dcb69)
parent 12ac28e0
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -74,6 +74,8 @@ int BN_rshift1(BIGNUM *r, const BIGNUM *a)
        c = (t & 1) ? BN_TBIT : 0;
    }
    r->top = j;
    if (!r->top)
        r->neg = 0; /* don't allow negative zero */
    bn_check_top(r);
    return (1);
}