summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwtc%google.com <devnull@localhost>2013-02-06 00:41:13 +0000
committerwtc%google.com <devnull@localhost>2013-02-06 00:41:13 +0000
commite9fc7f949f1745b76940a379b3b8ed7b2e6f93f5 (patch)
tree030d8492591d000de49cb024230d0a5ebffd53ce
parent41f36fc0661e33aec62b48283047c5f9d16ed8ec (diff)
downloadnss-hg-e9fc7f949f1745b76940a379b3b8ed7b2e6f93f5.tar.gz
Bug 822365: SHA512_EndRaw and SHA256_EndRaw need a local variable named t1
for the BYTESWAP4 and BYTESWAP8 macros in certain build configurations. TBR=kaie.
-rw-r--r--security/nss/lib/freebl/sha512.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/security/nss/lib/freebl/sha512.c b/security/nss/lib/freebl/sha512.c
index 301656e54..58dc5a447 100644
--- a/security/nss/lib/freebl/sha512.c
+++ b/security/nss/lib/freebl/sha512.c
@@ -468,8 +468,11 @@ SHA256_EndRaw(SHA256Context *ctx, unsigned char *digest,
{
PRUint32 h[8];
unsigned int len;
+#ifdef SWAP4MASK
+ PRUint32 t1;
+#endif
- memcpy(&h, ctx->h, sizeof(h));
+ memcpy(h, ctx->h, sizeof(h));
#if defined(IS_LITTLE_ENDIAN)
BYTESWAP4(h[0]);
@@ -1266,6 +1269,11 @@ void
SHA512_EndRaw(SHA512Context *ctx, unsigned char *digest,
unsigned int *digestLen, unsigned int maxDigestLen)
{
+#if defined(HAVE_LONG_LONG)
+ PRUint64 t1;
+#else
+ PRUint32 t1;
+#endif
PRUint64 h[8];
unsigned int len;