o Fix strtoul() error conditions check.

PR:		kern/108211
Submitted by:	Yong Tang
MFC after:	2 weeks
This commit is contained in:
Maxim Konovalov 2007-04-30 20:22:11 +00:00
parent 35e4f24d23
commit 38ec733c53

View File

@ -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;