mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-16 09:57:19 -05:00
added missing check after deserialisation of grouter item which caused a crash when receiving a malformed message data
This commit is contained in:
parent
7cd880e1e4
commit
e2542a6c50
@ -510,6 +510,12 @@ void p3GRouter::receiveTurtleData(RsTurtleGenericTunnelItem *gitem,const RsFileH
|
||||
|
||||
RsItem *itm = RsGRouterSerialiser().deserialise(item->data_bytes,&item->data_size) ;
|
||||
|
||||
if(itm == NULL)
|
||||
{
|
||||
std::cerr << "(EE) p3GRouter::receiveTurtleData(): cannot de-serialise data. Somthing wrong in the format. Item data (size="<< item->data_size << "): " << RsUtil::BinToHex((char*)item->data_bytes,item->data_size) << std::endl;
|
||||
return ;
|
||||
}
|
||||
|
||||
itm->PeerId(virtual_peer_id) ;
|
||||
|
||||
// At this point we can have either a transaction chunk, or a transaction ACK.
|
||||
|
Loading…
Reference in New Issue
Block a user