From: Huzaifa Sidhpurwala Date: Thu, 26 Jun 2014 22:45:58 +0000 (+0100) Subject: Make sure BN_sqr can never return a negative value. X-Git-Tag: OpenSSL_1_0_0n~66 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=8e28ef0d854455e36266c055d3b8d89feca2b24d;p=oweals%2Fopenssl.git Make sure BN_sqr can never return a negative value. PR#3410 (cherry picked from commit e14e764c0d5d469da63d0819c6ffc0e1e9e7f0bb) --- 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; }