Fix assertion in DEBUG builds

pull/157/head
Jeffrey Walton 2016-04-18 05:16:25 -04:00
parent 63cd55901c
commit 7d4a5d3ded
1 changed files with 5 additions and 2 deletions

View File

@ -306,9 +306,12 @@ void BLAKE2_Base<W, T_64bit>::Update(const byte *input, size_t length)
}
}
if (input && length)
{
memcpy_s(&m_state.buffer[m_state.length], BLOCKSIZE - m_state.length, input, length);
m_state.length += static_cast<unsigned int>(length);
}
}
template <class W, bool T_64bit>
void BLAKE2_Base<W, T_64bit>::TruncatedFinal(byte *hash, size_t size)