summaryrefslogtreecommitdiff
path: root/authenc.cpp
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2009-03-03 03:28:39 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2009-03-03 03:28:39 +0000
commitf1b1bf3d0dea2032f9ce5f9b3d29b7ed5d22a32a (patch)
treebbbd178df43bdc71503320cd87f5ec0c84c9d494 /authenc.cpp
parent94ee86bbf6d35476281a7012136e7c74c1693231 (diff)
downloadcryptopp-f1b1bf3d0dea2032f9ce5f9b3d29b7ed5d22a32a.tar.gz
tweaks/fixes for 5.6
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@435 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'authenc.cpp')
-rw-r--r--authenc.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/authenc.cpp b/authenc.cpp
index c9c22e3..e74cd3f 100644
--- a/authenc.cpp
+++ b/authenc.cpp
@@ -104,7 +104,7 @@ void AuthenticatedSymmetricCipherBase::Update(const byte *input, size_t length)
void AuthenticatedSymmetricCipherBase::ProcessData(byte *outString, const byte *inString, size_t length)
{
m_totalMessageLength += length;
- if (m_totalMessageLength > MaxMessageLength())
+ if (m_state >= State_IVSet && m_totalMessageLength > MaxMessageLength())
throw InvalidArgument(AlgorithmName() + ": message length exceeds maximum");
reswitch: