diff --git a/lib/isc/inet_aton.c b/lib/isc/inet_aton.c index dacc10944a..2732398dca 100644 --- a/lib/isc/inet_aton.c +++ b/lib/isc/inet_aton.c @@ -71,7 +71,7 @@ #if defined(LIBC_SCCS) && !defined(lint) static char sccsid[] = "@(#)inet_addr.c 8.1 (Berkeley) 6/17/93"; -static char rcsid[] = "$Id: inet_aton.c,v 1.21 2007/06/19 23:47:17 tbox Exp $"; +static char rcsid[] = "$Id: inet_aton.c,v 1.22 2008/12/01 13:26:51 marka Exp $"; #endif /* LIBC_SCCS and not lint */ #include @@ -145,7 +145,7 @@ isc_net_aton(const char *cp, struct in_addr *addr) { * a.b.c (with c treated as 16 bits) * a.b (with b treated as 24 bits) */ - if (pp >= parts + 3 || val > 0xff) + if (pp >= parts + 3 || val > 0xffU) return (0); *pp++ = (isc_uint8_t)val; c = *++cp; @@ -172,19 +172,19 @@ isc_net_aton(const char *cp, struct in_addr *addr) { break; case 2: /* a.b -- 8.24 bits */ - if (val > 0xffffff) + if (val > 0xffffffU) return (0); val |= parts[0] << 24; break; case 3: /* a.b.c -- 8.8.16 bits */ - if (val > 0xffff) + if (val > 0xffffU) return (0); val |= (parts[0] << 24) | (parts[1] << 16); break; case 4: /* a.b.c.d -- 8.8.8.8 bits */ - if (val > 0xff) + if (val > 0xffU) return (0); val |= (parts[0] << 24) | (parts[1] << 16) | (parts[2] << 8); break;