diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-04-29 19:28:39 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1997-04-29 19:28:39 +0000 |
commit | 095de800e36c5c6d43ee7c57deb08f4ec6c18330 (patch) | |
tree | 718bf669c3559305e3a881f07939a45254bde4f8 /lib/libc | |
parent | dcfbd3967b68464a430fc6ffd3328d7c2bbd78f0 (diff) |
oops
Diffstat (limited to 'lib/libc')
-rw-r--r-- | lib/libc/net/gethostnamadr.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/lib/libc/net/gethostnamadr.c b/lib/libc/net/gethostnamadr.c index ddf8d355283..2cb69be722f 100644 --- a/lib/libc/net/gethostnamadr.c +++ b/lib/libc/net/gethostnamadr.c @@ -52,7 +52,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: gethostnamadr.c,v 1.24 1997/04/29 19:15:46 deraadt Exp $"; +static char rcsid[] = "$OpenBSD: gethostnamadr.c,v 1.25 1997/04/29 19:28:38 deraadt Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -503,10 +503,10 @@ gethostbyname2(name, af) h_errno = HOST_NOT_FOUND; return (NULL); } - strncpy(hostbuf, name, MAXHOSTNAME-1); - hostbuf[MAXHOSTNAME-1] = '\0'; - bp = hostbuf + MAXHOSTNAME; - len = sizeof hostbuf - MAXHOSTNAME; + strncpy(hostbuf, name, MAXHOSTNAMELEN-1); + hostbuf[MAXHOSTNAMELEN-1] = '\0'; + bp = hostbuf + MAXHOSTNAMELEN; + len = sizeof hostbuf - MAXHOSTNAMELEN; host.h_name = hostbuf; host.h_aliases = host_aliases; host_aliases[0] = NULL; @@ -536,10 +536,10 @@ gethostbyname2(name, af) h_errno = HOST_NOT_FOUND; return (NULL); } - strncpy(hostbuf, name, MAXHOSTNAME-1); - hostbuf[MAXHOSTNAME-1] = '\0'; - bp = hostbuf + MAXHOSTNAME; - len = sizeof hostbuf - MAXHOSTNAME; + strncpy(hostbuf, name, MAXHOSTNAMELEN-1); + hostbuf[MAXHOSTNAMELEN-1] = '\0'; + bp = hostbuf + MAXHOSTNAMELEN; + len = sizeof hostbuf - MAXHOSTNAMELEN; host.h_name = hostbuf; host.h_aliases = host_aliases; host_aliases[0] = NULL; |