mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-23 16:21:29 -04:00
added checks after mallocs in several files
This commit is contained in:
parent
46520b0e22
commit
9c6e7dfc13
15 changed files with 157 additions and 12 deletions
|
@ -465,6 +465,8 @@ RsTurtleGenericTunnelItem *ftServer::deserialiseItem(void *data,uint32_t size) c
|
|||
return NULL; /* wrong type */
|
||||
}
|
||||
|
||||
try
|
||||
{
|
||||
switch(getRsItemSubType(rstype))
|
||||
{
|
||||
case RS_TURTLE_SUBTYPE_FILE_REQUEST : return new RsTurtleFileRequestItem(data,size) ;
|
||||
|
@ -477,6 +479,11 @@ RsTurtleGenericTunnelItem *ftServer::deserialiseItem(void *data,uint32_t size) c
|
|||
default:
|
||||
return NULL ;
|
||||
}
|
||||
}
|
||||
catch(std::exception& e)
|
||||
{
|
||||
std::cerr << "(EE) deserialisation error in " << __PRETTY_FUNCTION__ << ": " << e.what() << std::endl;
|
||||
}
|
||||
}
|
||||
|
||||
void ftServer::addVirtualPeer(const TurtleFileHash& hash,const TurtleVirtualPeerId& virtual_peer_id,RsTurtleGenericTunnelItem::Direction dir)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue