projects
/
oweals
/
openssl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
12ac28e
)
bn: fix occurance of negative zero in BN_rshift1()
author
Richard Levitte
<levitte@openssl.org>
Wed, 1 Feb 2017 01:29:46 +0000
(
02:29
+0100)
committer
Richard Levitte
<levitte@openssl.org>
Wed, 1 Feb 2017 02:17:38 +0000
(
03:17
+0100)
Reviewed-by: Rich Salz <rsalz@openssl.org>
(cherry picked from commit
0a2dcb6990dacc94337f746f4f4a6dfac1fbeac4
)
crypto/bn/bn_shift.c
patch
|
blob
|
history
diff --git
a/crypto/bn/bn_shift.c
b/crypto/bn/bn_shift.c
index b3206028713c44d6faa31cc3460f2f308a552a82..6a1eec80af4b45522cde030dda551a82ef5b0cb2 100644
(file)
--- a/
crypto/bn/bn_shift.c
+++ b/
crypto/bn/bn_shift.c
@@
-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);
}