Skip to content
Snippets Groups Projects
Commit 87dcee6a authored by gregorycu's avatar gregorycu Committed by Loïc Blot
Browse files

Prevent technically unsafe access with empty vector

parent a7c50a30
No related branches found
No related tags found
No related merge requests found
......@@ -77,6 +77,9 @@ void NetworkPacket::putRawString(const char* src, u32 len)
m_data.resize(m_datasize);
}
if (m_datasize == 0)
return;
memcpy(&m_data[m_read_offset], src, len);
m_read_offset += len;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment