diff options
author | maxim <maxim@FreeBSD.org> | 2007-04-30 20:22:11 +0000 |
---|---|---|
committer | maxim <maxim@FreeBSD.org> | 2007-04-30 20:22:11 +0000 |
commit | 3f7c014f10b49d101acb038cd1b04b8751fc1b49 (patch) | |
tree | 58a5cd0ad2f91056d9e7b877febc43f81902222a | |
parent | 331b3406526291675183a0c2440abafee7c72220 (diff) | |
download | FreeBSD-src-3f7c014f10b49d101acb038cd1b04b8751fc1b49.zip FreeBSD-src-3f7c014f10b49d101acb038cd1b04b8751fc1b49.tar.gz |
o Fix strtoul() error conditions check.
PR: kern/108211
Submitted by: Yong Tang
MFC after: 2 weeks
-rw-r--r-- | sys/netinet/libalias/alias_proxy.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/netinet/libalias/alias_proxy.c b/sys/netinet/libalias/alias_proxy.c index 11e17ca..b3185cc 100644 --- a/sys/netinet/libalias/alias_proxy.c +++ b/sys/netinet/libalias/alias_proxy.c @@ -173,7 +173,7 @@ 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; |