Date: Wed, 27 Dec 2017 14:50:07 +0000 (UTC) From: Hajimu UMEMOTO <ume@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org Subject: svn commit: r327238 - in stable: 10/lib/libc/net 11/lib/libc/net Message-ID: <201712271450.vBREo7rY042912@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: ume Date: Wed Dec 27 14:50:07 2017 New Revision: 327238 URL: https://svnweb.freebsd.org/changeset/base/327238 Log: MFC r327029: Don't ignore trailing spaces after numerical IP addresses. PR: 224403 Modified: stable/11/lib/libc/net/getaddrinfo.c Directory Properties: stable/11/ (props changed) Changes in other areas also in this revision: Modified: stable/10/lib/libc/net/getaddrinfo.c Directory Properties: stable/10/ (props changed) Modified: stable/11/lib/libc/net/getaddrinfo.c ============================================================================== --- stable/11/lib/libc/net/getaddrinfo.c Wed Dec 27 09:25:45 2017 (r327237) +++ stable/11/lib/libc/net/getaddrinfo.c Wed Dec 27 14:50:07 2017 (r327238) @@ -1275,7 +1275,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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712271450.vBREo7rY042912>