UdpTransport:IsIpAddressValid: Added extra :: check for ipv6
The code previously allowed ipv6 addresses with less than eight sections even without all-zero sections being compacted by a ::. BUG=webrtc:1028 Review-Url: https://codereview.webrtc.org/2606383003 Cr-Commit-Position: refs/heads/master@{#16108}
This commit is contained in:
parent
da5e9d04f5
commit
ece0571d44
@ -2875,6 +2875,10 @@ bool UdpTransport::IsIpAddressValid(const char* ipadr, const bool ipV6)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if(nColons < 7 && nDubbleColons == 0)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
if(!(nDots == 3 || nDots == 0))
|
||||
{
|
||||
return false;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user