mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fixed uninitialized memory read due to not checking the result of beMsgGetNodeId() in bitdht
This commit is contained in:
parent
84aedb8ac7
commit
9a2bbe339a
@ -1266,11 +1266,7 @@ void bdNode::recvPkt(char *msg, int len, struct sockaddr_in addr)
|
||||
/************************** handle id (all) ***************************/
|
||||
be_node *be_id = beMsgGetDictNode(be_data, "id");
|
||||
bdNodeId id;
|
||||
if (be_id)
|
||||
{
|
||||
beMsgGetNodeId(be_id, id);
|
||||
}
|
||||
else
|
||||
if(!be_id || !beMsgGetNodeId(be_id, id))
|
||||
{
|
||||
#ifdef DEBUG_NODE_PARSE
|
||||
std::cerr << "bdNode::recvPkt() Missing Peer Id. Dropping Msg";
|
||||
|
Loading…
Reference in New Issue
Block a user