summaryrefslogtreecommitdiffstats
path: root/lib/libc/net/gethostbynis.c
diff options
context:
space:
mode:
authorwpaul <wpaul@FreeBSD.org>1996-12-27 18:21:07 +0000
committerwpaul <wpaul@FreeBSD.org>1996-12-27 18:21:07 +0000
commit7187ede0636788711d157314ae5b131815515a80 (patch)
tree775c627300a0c60282f7459ec5e82dbc339a1dd7 /lib/libc/net/gethostbynis.c
parent3d869b9c34726691683c118cd61329ee5a519a69 (diff)
downloadFreeBSD-src-7187ede0636788711d157314ae5b131815515a80.zip
FreeBSD-src-7187ede0636788711d157314ae5b131815515a80.tar.gz
Small yet significant tweaks/cleanups:
- getservent: o put _yp_check() proto under #ifdef YP where it belongs o local YP buffers should be YPMAXRECORD + 2 bytes long and should be NUL terminated after copying - gethostbynis: o local YP buffer should be YPMAXRECORD + 2 bytes long - getnetbynis: o local YP buffer should be YPMAXRECORD + 2 bytes long and should be NUL terminated after copying - ether_addr: o local YP buffers should be YPMAXRECORD + 2 bytes long and should be NUL terminated after copying (in this case it's BUFSIZ + 2 bytes, but it happens that BUFSIZ == YPMAXRECORD. - gethostbydns: o nuke stray 'return(NULL)' in __dns_getanswer() (harmless but looks silly) These are 2.2 candidates. I will wait a few days to make sure these don't break anything and then, if there are no objections, move them to the 2.2 branch.
Diffstat (limited to 'lib/libc/net/gethostbynis.c')
-rw-r--r--lib/libc/net/gethostbynis.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/libc/net/gethostbynis.c b/lib/libc/net/gethostbynis.c
index c1f15e6..fa82d50 100644
--- a/lib/libc/net/gethostbynis.c
+++ b/lib/libc/net/gethostbynis.c
@@ -24,8 +24,8 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)$Id: gethostbynis.c,v 1.4 1996/08/29 20:07:54 peter Exp $";
-static char rcsid[] = "$Id: gethostbynis.c,v 1.4 1996/08/29 20:07:54 peter Exp $";
+static char sccsid[] = "@(#)$Id: gethostbynis.c,v 1.5 1996/12/24 17:01:49 wpaul Exp $";
+static char rcsid[] = "$Id: gethostbynis.c,v 1.5 1996/12/24 17:01:49 wpaul Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@@ -65,7 +65,7 @@ _gethostbynis(name, map, af)
int resultlen;
static struct hostent h;
static char *domain = (char *)NULL;
- static char ypbuf[YPMAXRECORD];
+ static char ypbuf[YPMAXRECORD + 2];
switch(af) {
case AF_INET:
OpenPOWER on IntegriCloud