diff options
| author | Kris Kennaway <kris@FreeBSD.org> | 2000-06-08 07:20:56 +0000 |
|---|---|---|
| committer | Kris Kennaway <kris@FreeBSD.org> | 2000-06-08 07:20:56 +0000 |
| commit | c7c24157e66f17d1a98c6726be3d8f71b249b58b (patch) | |
| tree | 64ee497c290fe5af206c2e9378cafd29e43db59c /lib/libc | |
| parent | 16ddfa94dce02e099cdbd96b1fe367c14a8d514e (diff) | |
Notes
Diffstat (limited to 'lib/libc')
| -rw-r--r-- | lib/libc/yp/yplib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/yp/yplib.c b/lib/libc/yp/yplib.c index 0622be1f8bbc..f5f348b89e76 100644 --- a/lib/libc/yp/yplib.c +++ b/lib/libc/yp/yplib.c @@ -372,7 +372,7 @@ again: ysd->dom_client = NULL; ysd->dom_socket = -1; } - sprintf(path, "%s/%s.%d", BINDINGDIR, dom, 2); + snprintf(path, sizeof(path), "%s/%s.%d", BINDINGDIR, dom, 2); if( (fd=open(path, O_RDONLY)) == -1) { /* no binding file, YP is dead. */ /* Try to bring it back to life. */ @@ -503,7 +503,7 @@ skipit: *(u_short *)&ypbr.ypbind_resp_u.ypbind_bindinfo.ypbind_binding_port; gotit: ysd->dom_vers = YPVERS; - strcpy(ysd->dom_domain, dom); + strlcpy(ysd->dom_domain, dom, sizeof(ysd->dom_domain)); } /* Don't rebuild the connection to the server unless we have to. */ |
