Don't ignore trailing spaces after numerical IP addresses.
PR: 224403 Reported by: Michael Kaufmann Reviewed by: Michael Kaufmann MFC after: 1 week
This commit is contained in:
parent
89abf1f0c0
commit
156cfa4de4
@ -1277,7 +1277,8 @@ explore_numeric(const struct addrinfo *pai, const char *hostname,
|
||||
* does not accept. So we need to separate the case for
|
||||
* AF_INET.
|
||||
*/
|
||||
if (inet_aton(hostname, (struct in_addr *)pton) != 1)
|
||||
if (inet_aton(hostname, (struct in_addr *)pton) != 1 ||
|
||||
hostname[strspn(hostname, "0123456789.xabcdefXABCDEF")] != '\0')
|
||||
return 0;
|
||||
p = pton;
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user