diff options
| author | Kris Kennaway <kris@FreeBSD.org> | 1999-12-05 21:02:41 +0000 |
|---|---|---|
| committer | Kris Kennaway <kris@FreeBSD.org> | 1999-12-05 21:02:41 +0000 |
| commit | 83ac6cdcee1615649168257b54bc71eba7200fd9 (patch) | |
| tree | 0d015e36855a314ac8cd9f005d26227be7500bd1 /lib/libc | |
| parent | 2ff5c01e98c5dbcbf2545601c2079999a8accd74 (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. */ |
