diff options
author | Simon L. B. Nielsen <simon@FreeBSD.org> | 2008-09-21 14:56:30 +0000 |
---|---|---|
committer | Simon L. B. Nielsen <simon@FreeBSD.org> | 2008-09-21 14:56:30 +0000 |
commit | bb1499d2aac1d25a95b8573ff425751f06f159e1 (patch) | |
tree | a136b5b2317abe8eb83b021afe5e088230fd67e2 /crypto/bn/bn_gf2m.c | |
parent | ee266f1253f9cc49430572463d26f72910dfb49e (diff) | |
download | src-test2-bb1499d2aac1d25a95b8573ff425751f06f159e1.tar.gz src-test2-bb1499d2aac1d25a95b8573ff425751f06f159e1.zip |
Notes
Diffstat (limited to 'crypto/bn/bn_gf2m.c')
-rw-r--r-- | crypto/bn/bn_gf2m.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crypto/bn/bn_gf2m.c b/crypto/bn/bn_gf2m.c index 6a793857e130..306f029f2789 100644 --- a/crypto/bn/bn_gf2m.c +++ b/crypto/bn/bn_gf2m.c @@ -384,7 +384,11 @@ int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const unsigned int p[]) if (zz == 0) break; d1 = BN_BITS2 - d0; - if (d0) z[dN] = (z[dN] << d1) >> d1; /* clear up the top d1 bits */ + /* clear up the top d1 bits */ + if (d0) + z[dN] = (z[dN] << d1) >> d1; + else + z[dN] = 0; z[0] ^= zz; /* reduction t^0 component */ for (k = 1; p[k] != 0; k++) |