diff options
author | Huzaifa Sidhpurwala <huzaifas@redhat.com> | 2014-06-26 23:45:58 +0100 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2014-06-26 23:56:32 +0100 |
commit | b7a4f98b152e5b9a56da1501e73053d83a9799b6 (patch) | |
tree | 2e942cf49cba7441eb29a9b5484b3032842435a3 | |
parent | 82a9dafe32e1e39b5adff18f9061e43d8df3d3c5 (diff) |
Make sure BN_sqr can never return a negative value.
PR#3410
(cherry picked from commit e14e764c0d5d469da63d0819c6ffc0e1e9e7f0bb)
-rw-r--r-- | crypto/bn/bn_sqr.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/crypto/bn/bn_sqr.c b/crypto/bn/bn_sqr.c index 270d0cd348..65bbf165d0 100644 --- a/crypto/bn/bn_sqr.c +++ b/crypto/bn/bn_sqr.c @@ -77,6 +77,7 @@ int BN_sqr(BIGNUM *r, const BIGNUM *a, BN_CTX *ctx) if (al <= 0) { r->top=0; + r->neg = 0; return 1; } |