diff --git a/filters.cpp b/filters.cpp index 09f9a956..537318d1 100644 --- a/filters.cpp +++ b/filters.cpp @@ -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;