diff options
author | Nils Larsch <nils@openssl.org> | 2005-07-21 22:40:39 +0000 |
---|---|---|
committer | Nils Larsch <nils@openssl.org> | 2005-07-21 22:40:39 +0000 |
commit | 17a2994dbd83929d89ae452f77f4b6b1d073df46 (patch) | |
tree | 4cf3c45819c5023a3da484618c1ca326c274ae62 /crypto/bn/bn_mont.c | |
parent | b554eef43b9ac5b92f590da6a120dbfd9ca0582e (diff) |
set correct bn->top value
Diffstat (limited to 'crypto/bn/bn_mont.c')
-rw-r--r-- | crypto/bn/bn_mont.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/bn/bn_mont.c b/crypto/bn/bn_mont.c index 6bcc9ad2e7..82af91f90d 100644 --- a/crypto/bn/bn_mont.c +++ b/crypto/bn/bn_mont.c @@ -292,7 +292,7 @@ int BN_MONT_CTX_set(BN_MONT_CTX *mont, const BIGNUM *mod, BN_CTX *ctx) buf[0]=mod->d[0]; /* tmod = N mod word size */ buf[1]=0; tmod.d=buf; - tmod.top=1; + tmod.top = buf[0] != 0 ? 1 : 0; tmod.dmax=2; tmod.neg=0; /* Ri = R^-1 mod N*/ |