summaryrefslogtreecommitdiff
path: root/authenc.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'authenc.cpp')
-rw-r--r--authenc.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/authenc.cpp b/authenc.cpp
index bd7e3994..a455f02c 100644
--- a/authenc.cpp
+++ b/authenc.cpp
@@ -18,7 +18,7 @@ void AuthenticatedSymmetricCipherBase::AuthenticateData(const byte *input, size_
unsigned int &num = m_bufferedDataLength;
byte* data = m_buffer.begin();
- if (num != 0) // process left over data
+ if (data && num) // process left over data
{
if (num+len >= blockSize)
{
@@ -45,7 +45,7 @@ void AuthenticatedSymmetricCipherBase::AuthenticateData(const byte *input, size_
len = leftOver;
}
- if (data)
+ if (data && len)
memcpy(data, input, len);
num = (unsigned int)len;
}