diff options
author | mcgreer%netscape.com <devnull@localhost> | 2000-10-18 15:41:23 +0000 |
---|---|---|
committer | mcgreer%netscape.com <devnull@localhost> | 2000-10-18 15:41:23 +0000 |
commit | 2cd6990ab5f35afd030bd2782cdd11e0f93be534 (patch) | |
tree | 31fc2caffbd00c7a698bb9e6adeb0941037ed7ea /security/nss/lib | |
parent | 043e669aefba62ea6998aa0f8c27ef5246481e8e (diff) | |
download | nss-hg-2cd6990ab5f35afd030bd2782cdd11e0f93be534.tar.gz |
fix for 64-bit platforms.
Diffstat (limited to 'security/nss/lib')
-rw-r--r-- | security/nss/lib/freebl/arcfour.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/security/nss/lib/freebl/arcfour.c b/security/nss/lib/freebl/arcfour.c index f520b96d3..ca10ed778 100644 --- a/security/nss/lib/freebl/arcfour.c +++ b/security/nss/lib/freebl/arcfour.c @@ -44,11 +44,6 @@ #define CONVERT_TO_WORDS #endif -/* this case is failing for 3.1. See bug #55234. */ -#if (defined(SOLARIS) || defined(HPUX)) && defined(NSS_USE_64) -#undef CONVERT_TO_WORDS -#endif - #if defined(AIX) || defined(OSF1) /* Treat array variables as longs, not bytes */ #define USE_LONG @@ -69,6 +64,8 @@ typedef PRUint8 Stype; #define ARCFOUR_STATE_SIZE 256 +#define MASK1BYTE (WORD)(0xff) + #define SWAP(a, b) \ tmp = a; \ a = b; \ @@ -395,7 +392,7 @@ rc4_wordconv(RC4Context *cx, unsigned char *output, #endif ARCFOUR_NEXT_BYTE(); streamWord |= (WORD)(cx->S[t]) << 8*i; - mask |= 0xff << 8*i; + mask |= MASK1BYTE << 8*i; } inWord = *pInWord++; /* If buffers are relatively misaligned, shift the bytes in inWord @@ -511,7 +508,7 @@ rc4_wordconv(RC4Context *cx, unsigned char *output, #endif ARCFOUR_NEXT_BYTE(); streamWord |= (WORD)(cx->S[t]) << 8*i; - mask |= 0xff << 8*i; + mask |= MASK1BYTE << 8*i; } *pOutWord = (*pOutWord & ~mask) | ((inWord ^ streamWord) & mask); cx->i = tmpi; |