From b99a92fe722e9229f4c1395c13e6b6b40ff6e03f Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Sun, 24 Jul 2016 23:41:24 -0400 Subject: [PATCH 1/2] Whitespace checkin --- zdeflate.cpp | 12 ++++++------ zdeflate.h | 4 ++-- zinflate.cpp | 8 ++++---- 3 files changed, 12 insertions(+), 12 deletions(-) diff --git a/zdeflate.cpp b/zdeflate.cpp index 494e2836..a016b300 100644 --- a/zdeflate.cpp +++ b/zdeflate.cpp @@ -94,7 +94,7 @@ struct HuffmanNode : symbol(0), parent(0) {} HuffmanNode(const HuffmanNode& rhs) : symbol(rhs.symbol), parent(rhs.parent) {} - + size_t symbol; union {size_t parent; unsigned depth, freq;}; }; @@ -582,7 +582,7 @@ void Deflator::MatchFound(unsigned int distance, unsigned int length) static const unsigned int lengthBases[] = {3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195, 227,258}; - static const unsigned int distanceBases[30] = + static const unsigned int distanceBases[30] = {1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073, 4097,6145,8193,12289,16385,24577}; @@ -601,10 +601,10 @@ void Deflator::MatchFound(unsigned int distance, unsigned int length) m_blockLength += length; } -inline unsigned int CodeLengthEncode(const unsigned int *begin, - const unsigned int *end, - const unsigned int *& p, - unsigned int &extraBits, +inline unsigned int CodeLengthEncode(const unsigned int *begin, + const unsigned int *end, + const unsigned int *& p, + unsigned int &extraBits, unsigned int &extraBitsLength) { unsigned int v = *p; diff --git a/zdeflate.h b/zdeflate.h index de221668..f6b42c21 100644 --- a/zdeflate.h +++ b/zdeflate.h @@ -44,12 +44,12 @@ public: //! \brief Construct a HuffmanEncoder HuffmanEncoder() {} - + //! \brief Construct a HuffmanEncoder //! \param codeBits a table of code bits //! \param nCodes the number of codes in the table HuffmanEncoder(const unsigned int *codeBits, unsigned int nCodes); - + //! \brief Initialize or reinitialize this object //! \param codeBits a table of code bits //! \param nCodes the number of codes in the table diff --git a/zinflate.cpp b/zinflate.cpp index 86bc2ed7..adffca01 100644 --- a/zinflate.cpp +++ b/zinflate.cpp @@ -1,7 +1,7 @@ // zinflate.cpp - written and placed in the public domain by Wei Dai // This is a complete reimplementation of the DEFLATE decompression algorithm. -// It should not be affected by any security vulnerabilities in the zlib +// It should not be affected by any security vulnerabilities in the zlib // compression library. In particular it is not affected by the double free bug // (http://www.kb.cert.org/vuls/id/368819). @@ -123,7 +123,7 @@ void HuffmanDecoder::Initialize(const unsigned int *codeBits, unsigned int nCode // compute a vector of triples sorted by code m_codeToValue.resize(nCodes - blCount[0]); unsigned int j=0; - for (i=0; i Date: Mon, 25 Jul 2016 08:03:56 -0400 Subject: [PATCH 2/2] Add guard for SunCC --- gcm.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcm.cpp b/gcm.cpp index 755f2e86..b5400b98 100644 --- a/gcm.cpp +++ b/gcm.cpp @@ -13,7 +13,7 @@ #ifndef CRYPTOPP_GENERATE_X64_MASM // Clang 3.3 integrated assembler crash on Linux. MacPorts GCC compile error. SunCC crash under Sun Studio 12.5 and below. -#if (defined(CRYPTOPP_LLVM_CLANG_VERSION) && (CRYPTOPP_LLVM_CLANG_VERSION < 30400)) || defined(CRYPTOPP_CLANG_INTEGRATED_ASSEMBLER) || (__SUNPRO_CC <= 0x5140) +#if (defined(CRYPTOPP_LLVM_CLANG_VERSION) && (CRYPTOPP_LLVM_CLANG_VERSION < 30400)) || defined(CRYPTOPP_CLANG_INTEGRATED_ASSEMBLER) || (defined(__SUNPRO_CC) && __SUNPRO_CC <= 0x5140) # undef CRYPTOPP_X86_ASM_AVAILABLE # undef CRYPTOPP_X32_ASM_AVAILABLE # undef CRYPTOPP_X64_ASM_AVAILABLE