diff options
author | rocksonhead <30463961+rocksonhead@users.noreply.github.com> | 2018-03-25 00:27:03 +0000 |
---|---|---|
committer | Jeffrey Walton <noloader@gmail.com> | 2018-03-24 20:27:03 -0400 |
commit | b0f71705955698cf1e0d1101dbe6430566b70b63 (patch) | |
tree | 2fc87d5492dbfbd13c285ff5ee0fac80af422397 /zinflate.h | |
parent | b42d728628fbfed9330aaa27eeb9d522a1307a6c (diff) | |
download | cryptopp-git-b0f71705955698cf1e0d1101dbe6430566b70b63.tar.gz |
Fix calling multiple ZlibDecompressor in parallel causes adler32 checksum failure (GH #596, #600)
Diffstat (limited to 'zinflate.h')
-rw-r--r-- | zinflate.h | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -133,11 +133,11 @@ private: void OutputString(const byte *string, size_t length);
void OutputPast(unsigned int length, unsigned int distance);
- static const HuffmanDecoder *FixedLiteralDecoder();
- static const HuffmanDecoder *FixedDistanceDecoder();
+ void CreateFixedDistanceDecoder();
+ void CreateFixedLiteralDecoder();
- const HuffmanDecoder& GetLiteralDecoder() const;
- const HuffmanDecoder& GetDistanceDecoder() const;
+ const HuffmanDecoder& GetLiteralDecoder();
+ const HuffmanDecoder& GetDistanceDecoder();
enum State {PRE_STREAM, WAIT_HEADER, DECODING_BODY, POST_STREAM, AFTER_END};
State m_state;
@@ -148,6 +148,7 @@ private: NextDecode m_nextDecode;
unsigned int m_literal, m_distance; // for LENGTH_BITS or DISTANCE_BITS
HuffmanDecoder m_dynamicLiteralDecoder, m_dynamicDistanceDecoder;
+ member_ptr<HuffmanDecoder> m_fixedLiteralDecoder, m_fixedDistanceDecoder;
LowFirstBitReader m_reader;
SecByteBlock m_window;
size_t m_current, m_lastFlush;
|