summaryrefslogtreecommitdiffstats
path: root/crypto/bn/bn_gf2m.c
diff options
context:
space:
mode:
authorAndy Polyakov <appro@openssl.org>2004-01-25 10:53:43 +0000
committerAndy Polyakov <appro@openssl.org>2004-01-25 10:53:43 +0000
commit27b2b78f9053dde311378689322903b65ed2e691 (patch)
treec9fa2f9384c10048f00d00c5d2fd128b5495bbd6 /crypto/bn/bn_gf2m.c
parent3a160f1dc6c312495d65fdfabd8f86c0071975c2 (diff)
Even though C specification explicitly says that constant type "stretches"
automatically to accomodate the value, some compilers fail to do so. Most notably 0x0123456789ABCDEF should come out as long long in 32-bit context, but HP compiler truncates it to 32-bit value. Which in turn breaks GF(2^m) arithmetics in hpux-parisc2-cc build. Therefore this fix...
Diffstat (limited to 'crypto/bn/bn_gf2m.c')
-rw-r--r--crypto/bn/bn_gf2m.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/crypto/bn/bn_gf2m.c b/crypto/bn/bn_gf2m.c
index fb3a8a9c77..30520eedec 100644
--- a/crypto/bn/bn_gf2m.c
+++ b/crypto/bn/bn_gf2m.c
@@ -228,7 +228,7 @@ static void bn_GF2m_mul_1x1(BN_ULONG *r1, BN_ULONG *r0, const BN_ULONG a, const
BN_ULONG tab[16], top3b = a >> 61;
register BN_ULONG a1, a2, a4, a8;
- a1 = a & (0x1FFFFFFFFFFFFFFF); a2 = a1 << 1; a4 = a2 << 1; a8 = a4 << 1;
+ a1 = a & (0x1FFFFFFFFFFFFFFFULL); a2 = a1 << 1; a4 = a2 << 1; a8 = a4 << 1;
tab[ 0] = 0; tab[ 1] = a1; tab[ 2] = a2; tab[ 3] = a1^a2;
tab[ 4] = a4; tab[ 5] = a1^a4; tab[ 6] = a2^a4; tab[ 7] = a1^a2^a4;