NetworkPacket::putRawPacket: resize m_data to datasize + memcpy
authorLoic Blot <loic.blot@unix-experience.fr>
Mon, 9 Oct 2017 22:47:37 +0000 (00:47 +0200)
committerSmallJoker <mk939@ymail.com>
Sun, 3 Jun 2018 15:31:59 +0000 (17:31 +0200)
commit9dc1f2d638ddde253fbfac26c856b5da4ea1495f
treecec9adcf9aebcdd99079f0d543ece6723bda7a90
parentd215198fe8dd9f19e8dc815bdf13989520318758
NetworkPacket::putRawPacket: resize m_data to datasize + memcpy

In some cases NetworkPacket was created using default constructor and m_data is not properly sized.
This fixed out of bounds memory copy
Also use memcpy instead of std::vector affectation to enhance packet creation
src/network/networkpacket.cpp