Official eMule-Board: Memleak In Csearch::processresponse - Official eMule-Board

Jump to content


Page 1 of 1

Memleak In Csearch::processresponse

#1 User is offline   tHeWiZaRdOfDoS 

  • Man, what a bunch of jokers...
  • PipPipPipPipPipPipPip
  • Group: Members
  • Posts: 5,391
  • Joined: 28-December 02

Posted 18 July 2012 - 03:55 PM

If we receive a malformed search response, we are currently creating a memleak here:

Quote

// Make sure the node is not sending more results than we requested, which is not only a protocol vialoation
// but most likely a malicous answer
if (plistResults->size() > GetRequestContactCount() && !(pRequestedMoreNodesContact == pFromContact && plistResults->size() <= KADEMLIA_FIND_VALUE_MORE) )
{
DebugLogWarning(_T("Node %s sent more contacts than requested on a routing query, ignoring response"), ipstr(ntohl(uFromIP)));
delete plistResults; //>>> WiZaRd::Memleak FiX
return;
}


because plistResults doesn't get deleted - fix included above. :flowers:

This post has been edited by tHeWiZaRdOfDoS: 18 July 2012 - 03:57 PM

0

  • Member Options

Page 1 of 1

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users