From 7eff1e6fbfd2a9c74d0a8621136fa6f6f663d4da Mon Sep 17 00:00:00 2001 From: "wtc%google.com" Date: Wed, 6 Feb 2013 00:41:13 +0000 Subject: [PATCH] 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. git-svn-id: svn://10.0.0.236/trunk@264695 18797224-902f-48f8-a5cc-f745e15eee43 --- mozilla/security/nss/lib/freebl/sha512.c | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/mozilla/security/nss/lib/freebl/sha512.c b/mozilla/security/nss/lib/freebl/sha512.c index c056344371e..5196df73d58 100644 --- a/mozilla/security/nss/lib/freebl/sha512.c +++ b/mozilla/security/nss/lib/freebl/sha512.c @@ -4,7 +4,7 @@ * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -/* $Id: sha512.c,v 1.22 2013-02-05 18:10:42 wtc%google.com Exp $ */ +/* $Id: sha512.c,v 1.23 2013-02-06 00:41:13 wtc%google.com Exp $ */ #ifdef FREEBL_NO_DEPEND #include "stubs.h" @@ -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;