Stop accepting invalid ipv4's

This commit is contained in:
Vlad 2021-07-26 01:13:05 +03:00 committed by GitHub
parent b98263bfdb
commit 28c34bd101
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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;
} }