mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 16:39:29 -05:00
removed uninitialized memory read in determination of own IP
This commit is contained in:
parent
cb5d247565
commit
33b39a8be6
@ -1673,6 +1673,7 @@ bool p3PeerMgrIMPL::addCandidateForOwnExternalAddress(const RsPeerId &from, cons
|
|||||||
|
|
||||||
bool p3PeerMgrIMPL::locked_computeCurrentBestOwnExtAddressCandidate(sockaddr_storage& addr, uint32_t& count)
|
bool p3PeerMgrIMPL::locked_computeCurrentBestOwnExtAddressCandidate(sockaddr_storage& addr, uint32_t& count)
|
||||||
{
|
{
|
||||||
|
sockaddr_storage_clear(addr);
|
||||||
std::map<sockaddr_storage, pqi::ZeroedInt> addr_counts ;
|
std::map<sockaddr_storage, pqi::ZeroedInt> addr_counts ;
|
||||||
|
|
||||||
for(std::map<RsPeerId,sockaddr_storage>::iterator it(mReportedOwnAddresses.begin());it!=mReportedOwnAddresses.end();++it)
|
for(std::map<RsPeerId,sockaddr_storage>::iterator it(mReportedOwnAddresses.begin());it!=mReportedOwnAddresses.end();++it)
|
||||||
@ -1697,7 +1698,7 @@ bool p3PeerMgrIMPL::locked_computeCurrentBestOwnExtAddressCandidate(sockaddr_sto
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
return true ;
|
return count > 0 ;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool p3PeerMgrIMPL::getExtAddressReportedByFriends(sockaddr_storage &addr, uint8_t& /*isstable*/)
|
bool p3PeerMgrIMPL::getExtAddressReportedByFriends(sockaddr_storage &addr, uint8_t& /*isstable*/)
|
||||||
|
Loading…
Reference in New Issue
Block a user