diff options
| author | Bill Paul <wpaul@FreeBSD.org> | 1996-12-27 18:21:07 +0000 |
|---|---|---|
| committer | Bill Paul <wpaul@FreeBSD.org> | 1996-12-27 18:21:07 +0000 |
| commit | 3951b8e32c209792888f07b4511810e03ac61278 (patch) | |
| tree | 775c627300a0c60282f7459ec5e82dbc339a1dd7 /lib/libc/net/getnetbynis.c | |
| parent | f9abc058e45f584f9b4887dc77a34e3f784f65b4 (diff) | |
Notes
Diffstat (limited to 'lib/libc/net/getnetbynis.c')
| -rw-r--r-- | lib/libc/net/getnetbynis.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/libc/net/getnetbynis.c b/lib/libc/net/getnetbynis.c index 44f2066a8adc..55e3600d09d5 100644 --- a/lib/libc/net/getnetbynis.c +++ b/lib/libc/net/getnetbynis.c @@ -24,8 +24,8 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char sccsid[] = "@(#)$Id: getnetbynis.c,v 1.6 1996/08/29 20:08:01 peter Exp $"; -static char rcsid[] = "$Id: getnetbynis.c,v 1.6 1996/08/29 20:08:01 peter Exp $"; +static char sccsid[] = "@(#)$Id: getnetbynis.c,v 1.7 1996/12/06 00:12:31 jkh Exp $"; +static char rcsid[] = "$Id: getnetbynis.c,v 1.7 1996/12/06 00:12:31 jkh Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/param.h> @@ -64,7 +64,7 @@ _getnetbynis(name, map, af) int resultlen; static struct netent h; static char *domain = (char *)NULL; - static char ypbuf[YPMAXRECORD]; + static char ypbuf[YPMAXRECORD + 2]; switch(af) { case AF_INET: @@ -83,6 +83,7 @@ _getnetbynis(name, map, af) return (NULL); bcopy((char *)result, (char *)&ypbuf, resultlen); + ypbuf[resultlen] = '\0'; free(result); result = (char *)&ypbuf; |
