summaryrefslogtreecommitdiff
path: root/authenc.cpp
diff options
context:
space:
mode:
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: