diff options
| author | Maxim Konovalov <maxim@FreeBSD.org> | 2007-05-14 17:31:41 +0000 |
|---|---|---|
| committer | Maxim Konovalov <maxim@FreeBSD.org> | 2007-05-14 17:31:41 +0000 |
| commit | e579df9fac72dad52864d36617ea4c7fd19b9c3c (patch) | |
| tree | 14afb37ca00560983532225cfcd59639f66c0f1a /sys/netinet | |
| parent | 0f71716f9e10b05a7069892ee64dd70f35cbe00a (diff) | |
Notes
Diffstat (limited to 'sys/netinet')
| -rw-r--r-- | sys/netinet/libalias/alias_proxy.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet/libalias/alias_proxy.c b/sys/netinet/libalias/alias_proxy.c index f683ba095240..061554495a05 100644 --- a/sys/netinet/libalias/alias_proxy.c +++ b/sys/netinet/libalias/alias_proxy.c @@ -179,11 +179,11 @@ inet_aton(cp, addr) l = strtoul(c, &endptr, 0); - if (l == ULONG_MAX || l == 0) + if (l == ULONG_MAX || (l == 0 && endptr == c)) return (0); - val = (in_addr_t)l; - /* + val = (in_addr_t)l; + /* * If the whole string is invalid, endptr will equal * c.. this way we can make sure someone hasn't * gone '.12' or something which would get past |
