summaryrefslogtreecommitdiff
path: root/authenc.cpp
diff options
context:
space:
mode:
authorweidai <weidai11@users.noreply.github.com>2009-03-03 03:28:39 +0000
committerweidai <weidai11@users.noreply.github.com>2009-03-03 03:28:39 +0000
commit8565900724e0cf4cf60ceeea62d97ff66763d477 (patch)
treebbbd178df43bdc71503320cd87f5ec0c84c9d494 /authenc.cpp
parent7d88bbd9edd5a084b34be61a933789412821db0d (diff)
downloadcryptopp-git-8565900724e0cf4cf60ceeea62d97ff66763d477.tar.gz
tweaks/fixes for 5.6
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 c9c22e33..e74cd3f8 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: