Skip to content

Commit

Permalink
Update AdditiveCipherTemplate<S>::ProcessData (GH #1010)
Browse files Browse the repository at this point in the history
  • Loading branch information
noloader committed Apr 10, 2021
1 parent a6bb071 commit 80bef2a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions strciphr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,9 @@ void AdditiveCipherTemplate<S>::ProcessData(byte *outString, const byte *inStrin

if (inString == outString)
{
m_tempOutString.Assign(inString, length);
// No need to copy inString to outString.
// Just allocate the space.
m_tempOutString.New(length);
m_tempOutString.SetMark(0);
outString = m_tempOutString.BytePtr();
copyOut = true;
Expand Down Expand Up @@ -242,7 +244,9 @@ void CFB_CipherTemplate<BASE>::ProcessData(byte *outString, const byte *inString

if (inString == outString)
{
m_tempOutString.Assign(inString, length);
// No need to copy inString to outString.
// Just allocate the space.
m_tempOutString.New(length);
m_tempOutString.SetMark(0);
outString = m_tempOutString.BytePtr();
copyOut = true;
Expand Down

0 comments on commit 80bef2a

Please sign in to comment.