Author: ume Date: Wed Dec 20 17:44:31 2017 New Revision: 327029 URL: https://svnweb.freebsd.org/changeset/base/327029
Log: Don't ignore trailing spaces after numerical IP addresses. PR: 224403 Reported by: Michael Kaufmann Reviewed by: Michael Kaufmann MFC after: 1 week Modified: head/lib/libc/net/getaddrinfo.c Modified: head/lib/libc/net/getaddrinfo.c ============================================================================== --- head/lib/libc/net/getaddrinfo.c Wed Dec 20 16:49:45 2017 (r327028) +++ head/lib/libc/net/getaddrinfo.c Wed Dec 20 17:44:31 2017 (r327029) @@ -1277,7 +1277,8 @@ explore_numeric(const struct addrinfo *pai, const char * 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; _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"