Update tempOutString buffer length calculation

This commit is contained in:
Jeffrey Walton 2021-03-17 23:19:46 -04:00
parent 9a7f4f05cd
commit 29b7ea850e
No known key found for this signature in database
GPG Key ID: B36AB348921B1838

View File

@ -116,7 +116,7 @@ void AdditiveCipherTemplate<S>::ProcessData(byte *outString, const byte *inStrin
if (!length) {
if (copyOut)
std::memcpy(savedOutString, m_tempOutString.BytePtr(), savedLength-length);
std::memcpy(savedOutString, m_tempOutString.BytePtr(), savedLength);
return;
}
@ -259,7 +259,7 @@ void CFB_CipherTemplate<BASE>::ProcessData(byte *outString, const byte *inString
if (!length) {
if (copyOut)
std::memcpy(savedOutString, m_tempOutString.BytePtr(), savedLength-length);
std::memcpy(savedOutString, m_tempOutString.BytePtr(), savedLength);
return;
}