mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-27 03:40:22 +00:00
Added CRYPTOPP_ASSERT to SafeConvert result because FileSink::Put2 does not throw. Maybe Put2 should work with std::streamsize::max() size blocks
This commit is contained in:
parent
978b7149f2
commit
9d579ad208
@ -239,7 +239,9 @@ size_t FileSink::Put2(const byte *inString, size_t length, int messageEnd, bool
|
||||
while (length > 0)
|
||||
{
|
||||
std::streamsize size;
|
||||
if (!SafeConvert(length, size))
|
||||
bool safe = SafeConvert(length, size);
|
||||
CRYPTOPP_ASSERT(safe);
|
||||
if (!safe)
|
||||
size = numeric_limits<std::streamsize>::max();
|
||||
m_stream->write((const char *)inString, size);
|
||||
inString += size;
|
||||
|
Loading…
Reference in New Issue
Block a user