about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-10-02 07:09:48 +0000
committerUlrich Drepper <drepper@redhat.com>1999-10-02 07:09:48 +0000
commita465f6bdd2a7a1f79083fec65c3eeff093451e9e (patch)
tree0427c1e88ede2b55e15c0cc8b252223293371352
parent20cc4c87c02444b5836052fac76a57895c3b5f87 (diff)
downloadglibc-a465f6bdd2a7a1f79083fec65c3eeff093451e9e.tar.gz
glibc-a465f6bdd2a7a1f79083fec65c3eeff093451e9e.tar.xz
glibc-a465f6bdd2a7a1f79083fec65c3eeff093451e9e.zip
Update.
	* resolv/inet_net_ntop.c (inet_net_ntop_ipv4): If BITS is zero
	account for added '0'.
-rw-r--r--ChangeLog3
-rw-r--r--resolv/inet_net_ntop.c1
2 files changed, 4 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 2ef7e9af14..0962c90db2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 1999-10-01  Ulrich Drepper  <drepper@cygnus.com>
 
+	* resolv/inet_net_ntop.c (inet_net_ntop_ipv4): If BITS is zero
+	account for added '0'.
+
 	* resolv/nss_dns/dns-host.c (_nss_dns_gethostbyaddr_r): Align
 	handling of IPv6 tunnel address handling with bind 8.2.1.  Allow
 	len argument to be greater than needed address size.
diff --git a/resolv/inet_net_ntop.c b/resolv/inet_net_ntop.c
index 497b0af7c6..d012c537cf 100644
--- a/resolv/inet_net_ntop.c
+++ b/resolv/inet_net_ntop.c
@@ -98,6 +98,7 @@ inet_net_ntop_ipv4(src, bits, dst, size)
 		if (size < sizeof "0")
 			goto emsgsize;
 		*dst++ = '0';
+		--size;
 		*dst = '\0';
 	}