From 3f7c014f10b49d101acb038cd1b04b8751fc1b49 Mon Sep 17 00:00:00 2001 From: maxim Date: Mon, 30 Apr 2007 20:22:11 +0000 Subject: o Fix strtoul() error conditions check. PR: kern/108211 Submitted by: Yong Tang MFC after: 2 weeks --- sys/netinet/libalias/alias_proxy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/netinet/libalias') 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; -- cgit v1.1