summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_exp2.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/bn/bn_exp2.c')
-rw-r--r--crypto/bn/bn_exp2.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/crypto/bn/bn_exp2.c b/crypto/bn/bn_exp2.c
index 979ceeffce..1223c678ce 100644
--- a/crypto/bn/bn_exp2.c
+++ b/crypto/bn/bn_exp2.c
@@ -179,7 +179,8 @@ int BN_mod_exp2_mont(BIGNUM *rr, const BIGNUM *a1, const BIGNUM *p1,
a_mod_m = a1;
if (BN_is_zero(a_mod_m))
{
- ret = BN_zero(rr);
+ BN_zero(rr);
+ ret = 1;
goto err;
}
@@ -214,7 +215,8 @@ int BN_mod_exp2_mont(BIGNUM *rr, const BIGNUM *a1, const BIGNUM *p1,
a_mod_m = a2;
if (BN_is_zero(a_mod_m))
{
- ret = BN_zero(rr);
+ BN_zero(rr);
+ ret = 1;
goto err;
}
if (!BN_to_montgomery(&(val2[0]),a_mod_m,mont,ctx)) goto err;