More static analysis fixes

This commit is contained in:
SChernykh
2020-12-08 16:05:58 +01:00
parent d5f84a813d
commit 83d152f557
14 changed files with 40 additions and 33 deletions

View File

@@ -56,8 +56,8 @@ void xmrig::LineReader::reset()
void xmrig::LineReader::add(const char *data, size_t size)
{
if (size > XMRIG_NET_BUFFER_CHUNK_SIZE - m_pos) {
// it breakes correctness silently for long lines
if (size + m_pos > XMRIG_NET_BUFFER_CHUNK_SIZE) {
// it breaks correctness silently for long lines
return;
}