diff options
-rw-r--r-- | resolv/inet_addr.c | 2 | ||||
-rw-r--r-- | resolv/tst-aton.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/resolv/inet_addr.c b/resolv/inet_addr.c index 59e160e..83f2ec6 100644 --- a/resolv/inet_addr.c +++ b/resolv/inet_addr.c @@ -183,7 +183,7 @@ __inet_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 > res.bytes + 3 || val > 0xff) + if (pp > res.bytes + 2 || val > 0xff) goto ret_0; *pp++ = val; c = *++cp; diff --git a/resolv/tst-aton.c b/resolv/tst-aton.c index 79077b0..3469b19 100644 --- a/resolv/tst-aton.c +++ b/resolv/tst-aton.c @@ -39,6 +39,7 @@ static struct tests { "1.2.256.4", 0, 0 }, { "1.2.3.0x100", 0, 0 }, { "323543357756889", 0, 0 }, + { "10.1.2.3.4", 0, 0}, }; |