aboutsummaryrefslogtreecommitdiff
path: root/inet
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2000-01-18 10:17:32 +0000
committerUlrich Drepper <drepper@redhat.com>2000-01-18 10:17:32 +0000
commit6e9b72d3abab3236a2e079587ad5c5653d96e7bd (patch)
tree70a7240d7d3cb1ba0e16709dac8b154a879c975c /inet
parent3a47453d294550539dd26da02dfcecd5e09a4f0a (diff)
downloadglibc-6e9b72d3abab3236a2e079587ad5c5653d96e7bd.tar
glibc-6e9b72d3abab3236a2e079587ad5c5653d96e7bd.tar.gz
glibc-6e9b72d3abab3236a2e079587ad5c5653d96e7bd.tar.bz2
glibc-6e9b72d3abab3236a2e079587ad5c5653d96e7bd.zip
Update.
* sysdeps/unix/sysv/linux/fstatvfs.c: Move actual code in... * sysdeps/unix/sysv/linux/internal_statvfs.c: ...here. New file. * sysdeps/unix/sysv/linux/statvfs.c: Don't use fstatvfs since the open call would require read permission. Patch by James Antill <james@and.org>. * sysdeps/unix/sysv/linux/Dist: Add internal_fnmatch.c. * inet/getnameinfo.c: Terminate host name for NI_NOFQDN. PR1515. Patches by Hideaki YOSHIFUJI <yoshfuji@ecei.tohoku.ac.jp>.
Diffstat (limited to 'inet')
-rw-r--r--inet/getnameinfo.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/inet/getnameinfo.c b/inet/getnameinfo.c
index 28713e1f85..709f9ecbfe 100644
--- a/inet/getnameinfo.c
+++ b/inet/getnameinfo.c
@@ -243,6 +243,8 @@ getnameinfo (const struct sockaddr *sa, socklen_t addrlen, char *host,
{
strncpy (host, h->h_name,
min(hostlen, (size_t) (c - h->h_name)));
+ host[min(hostlen - 1, (size_t) (c - h->h_name))]
+ = '\0';
break;
}
}