diff options
author | green <green@FreeBSD.org> | 1999-10-31 04:43:55 +0000 |
---|---|---|
committer | green <green@FreeBSD.org> | 1999-10-31 04:43:55 +0000 |
commit | 3514435a4cae39cb637cc6e9bc524d3411bd9988 (patch) | |
tree | c441220d59ce53a8a5dd54093695f27249a5edd9 /lib/libc/net/inet_addr.c | |
parent | 5e58dc63ee1fb4790892c28641e9c19e421705de (diff) | |
download | FreeBSD-src-3514435a4cae39cb637cc6e9bc524d3411bd9988.zip FreeBSD-src-3514435a4cae39cb637cc6e9bc524d3411bd9988.tar.gz |
Allow whitespace termination. Internal use of /etc/resolv.conf relies
on this, and who knows what else would, too...
Diffstat (limited to 'lib/libc/net/inet_addr.c')
-rw-r--r-- | lib/libc/net/inet_addr.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/libc/net/inet_addr.c b/lib/libc/net/inet_addr.c index 8998624..8f6543c 100644 --- a/lib/libc/net/inet_addr.c +++ b/lib/libc/net/inet_addr.c @@ -135,13 +135,16 @@ inet_aton(cp, addr) c++; break; - case '\0' : + case '\0': gotend = 1; break; default: - /* Invalid character, so fail */ - return (0); + if (isspace(*c)) { + gotend = 1; + break; + } else + return (0); /* Invalid character, so fail */ } } |