From 77d342339b3149f02aaa3521a27b6216468d43dc Mon Sep 17 00:00:00 2001 From: weidai Date: Thu, 5 Mar 2009 08:53:50 +0000 Subject: fix bug when AuthenticatedDecryptionFilter::MAC_AT_BEGIN is not specified git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@439 57ff6487-cd31-0410-9ec3-f628ee90f5f0 --- filters.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'filters.cpp') diff --git a/filters.cpp b/filters.cpp index 86bd616..9a749f4 100644 --- a/filters.cpp +++ b/filters.cpp @@ -885,7 +885,11 @@ byte * AuthenticatedDecryptionFilter::ChannelCreatePutSpace(const std::string &c size_t AuthenticatedDecryptionFilter::ChannelPut2(const std::string &channel, const byte *begin, size_t length, int messageEnd, bool blocking) { if (channel.empty()) + { + if (m_lastSize > 0) + m_hashVerifier.ForceNextPut(); return FilterWithBufferedInput::Put2(begin, length, messageEnd, blocking); + } if (channel == "AAD") return m_hashVerifier.Put2(begin, length, 0, blocking); -- cgit v1.2.1