mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
Stop accepting invalid ipv4's
This commit is contained in:
parent
b98263bfdb
commit
28c34bd101
|
@ -1346,6 +1346,8 @@ int net_addr_from_str(NETADDR *addr, const char *string)
|
||||||
if(parse_uint16(&addr->port, &str))
|
if(parse_uint16(&addr->port, &str))
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
return -1;
|
||||||
|
|
||||||
addr->type = NETTYPE_IPV4;
|
addr->type = NETTYPE_IPV4;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue