diff options
Diffstat (limited to 'src/lib/libcrypto/bn/bn_sqrt.c')
| -rw-r--r-- | src/lib/libcrypto/bn/bn_sqrt.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/src/lib/libcrypto/bn/bn_sqrt.c b/src/lib/libcrypto/bn/bn_sqrt.c index 9a59d56b3f..f94fa41094 100644 --- a/src/lib/libcrypto/bn/bn_sqrt.c +++ b/src/lib/libcrypto/bn/bn_sqrt.c | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | /* $OpenBSD: bn_sqrt.c,v 1.5 2014/07/11 08:44:48 jsing Exp $ */ | 1 | /* $OpenBSD: bn_sqrt.c,v 1.6 2015/02/09 15:49:22 jsing Exp $ */ |
| 2 | /* Written by Lenka Fibikova <fibikova@exp-math.uni-essen.de> | 2 | /* Written by Lenka Fibikova <fibikova@exp-math.uni-essen.de> |
| 3 | * and Bodo Moeller for the OpenSSL project. */ | 3 | * and Bodo Moeller for the OpenSSL project. */ |
| 4 | /* ==================================================================== | 4 | /* ==================================================================== |
| @@ -108,13 +108,17 @@ BN_mod_sqrt(BIGNUM *in, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx) | |||
| 108 | } | 108 | } |
| 109 | 109 | ||
| 110 | BN_CTX_start(ctx); | 110 | BN_CTX_start(ctx); |
| 111 | A = BN_CTX_get(ctx); | 111 | if ((A = BN_CTX_get(ctx)) == NULL) |
| 112 | b = BN_CTX_get(ctx); | 112 | goto end; |
| 113 | q = BN_CTX_get(ctx); | 113 | if ((b = BN_CTX_get(ctx)) == NULL) |
| 114 | t = BN_CTX_get(ctx); | 114 | goto end; |
| 115 | x = BN_CTX_get(ctx); | 115 | if ((q = BN_CTX_get(ctx)) == NULL) |
| 116 | y = BN_CTX_get(ctx); | 116 | goto end; |
| 117 | if (y == NULL) | 117 | if ((t = BN_CTX_get(ctx)) == NULL) |
| 118 | goto end; | ||
| 119 | if ((x = BN_CTX_get(ctx)) == NULL) | ||
| 120 | goto end; | ||
| 121 | if ((y = BN_CTX_get(ctx)) == NULL) | ||
| 118 | goto end; | 122 | goto end; |
| 119 | 123 | ||
| 120 | if (ret == NULL) | 124 | if (ret == NULL) |
