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: master-pre-reformat~611 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3b3b69ab25fbaba80a843dedec5ae9733fefca43;p=thirdparty%2Fopenssl.git Make sure BN_sqr can never return a negative value. PR#3410 --- diff --git a/crypto/bn/bn_sqr.c b/crypto/bn/bn_sqr.c index 270d0cd348b..65bbf165d0e 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; }