(trunk, libT) #5157 'check valid address before UTP_Create()' -- added.
This commit is contained in:
parent
ccb4a16ab8
commit
61c1f7efec
|
@ -302,6 +302,10 @@ tr_netOpenPeerUTPSocket (tr_session * session,
|
|||
{
|
||||
struct sockaddr_storage ss;
|
||||
socklen_t sslen;
|
||||
|
||||
if (!tr_address_is_valid_for_peers (addr, port))
|
||||
return -EINVAL;
|
||||
|
||||
sslen = setup_sockaddr (addr, port, &ss);
|
||||
|
||||
return UTP_Create (tr_utpSendTo, (void*)session,
|
||||
|
|
Loading…
Reference in New Issue