mirror of
https://github.com/openssl/openssl.git
synced 2025-04-12 20:30:52 +08:00
bn: fix occurance of negative zero in BN_rshift1()
Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
parent
38d1b3cc02
commit
0a2dcb6990
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user