mirror of
https://github.com/shadps4-emu/ext-cryptopp.git
synced 2024-11-27 11:50:29 +00:00
Cleared UBsan error on non-null pointer use
This commit is contained in:
parent
8cef820ac8
commit
e4ab1cd70c
@ -514,6 +514,7 @@ size_t RandomNumberSink::Put2(const byte *begin, size_t length, int messageEnd,
|
||||
|
||||
size_t ArraySink::Put2(const byte *begin, size_t length, int messageEnd, bool blocking)
|
||||
{
|
||||
if(!begin || !length) return length;
|
||||
if (m_buf+m_total != begin)
|
||||
memcpy(m_buf+m_total, begin, STDMIN(length, SaturatingSubtract(m_size, m_total)));
|
||||
m_total += length;
|
||||
|
Loading…
Reference in New Issue
Block a user