diff options
Diffstat (limited to 'src/lib/libcrypto/bn/bn_gf2m.c')
-rw-r--r-- | src/lib/libcrypto/bn/bn_gf2m.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/lib/libcrypto/bn/bn_gf2m.c b/src/lib/libcrypto/bn/bn_gf2m.c index 6a793857e1..306f029f27 100644 --- a/src/lib/libcrypto/bn/bn_gf2m.c +++ b/src/lib/libcrypto/bn/bn_gf2m.c | |||
@@ -384,7 +384,11 @@ int BN_GF2m_mod_arr(BIGNUM *r, const BIGNUM *a, const unsigned int p[]) | |||
384 | if (zz == 0) break; | 384 | if (zz == 0) break; |
385 | d1 = BN_BITS2 - d0; | 385 | d1 = BN_BITS2 - d0; |
386 | 386 | ||
387 | if (d0) z[dN] = (z[dN] << d1) >> d1; /* clear up the top d1 bits */ | 387 | /* clear up the top d1 bits */ |
388 | if (d0) | ||
389 | z[dN] = (z[dN] << d1) >> d1; | ||
390 | else | ||
391 | z[dN] = 0; | ||
388 | z[0] ^= zz; /* reduction t^0 component */ | 392 | z[0] ^= zz; /* reduction t^0 component */ |
389 | 393 | ||
390 | for (k = 1; p[k] != 0; k++) | 394 | for (k = 1; p[k] != 0; k++) |