about summary refs log tree commit diff
path: root/resolv/inet_addr.c
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2001-03-04 17:11:25 +0000
committerAndreas Jaeger <aj@suse.de>2001-03-04 17:11:25 +0000
commit82a7bfdb12649b2a1c99b072e35b7d5102f327c8 (patch)
treebb3b6877084d72c5232df8c13a33913d5def56ea /resolv/inet_addr.c
parent1746f2b0a1bbac7d80c24d4d301166b8685b117a (diff)
downloadglibc-82a7bfdb12649b2a1c99b072e35b7d5102f327c8.tar.gz
glibc-82a7bfdb12649b2a1c99b072e35b7d5102f327c8.tar.xz
glibc-82a7bfdb12649b2a1c99b072e35b7d5102f327c8.zip
* resolv/tst-aton.c: Add testcase for IP with four points.
	* resolv/inet_addr.c: Don't recognize an IP with four points.
	Patch by Andre' Breiler <A.Breiler@gmx.net>.
Diffstat (limited to 'resolv/inet_addr.c')
-rw-r--r--resolv/inet_addr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/resolv/inet_addr.c b/resolv/inet_addr.c
index 59e160e435..83f2ec695e 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;