summaryrefslogtreecommitdiffstats
path: root/usr.sbin/bind/lib/isc/unix/socket.c
diff options
context:
space:
mode:
authorjakob <jakob@openbsd.org>2007-12-09 13:57:41 +0000
committerjakob <jakob@openbsd.org>2007-12-09 13:57:41 +0000
commit5a46a4df6bea0a2e38a42058c43eb9a981d20a2c (patch)
treea0153e13e293fad3682587cf2dcc6903bf1aa6d9 /usr.sbin/bind/lib/isc/unix/socket.c
parentregen using autoconf 2.61 (diff)
downloadwireguard-openbsd-5a46a4df6bea0a2e38a42058c43eb9a981d20a2c.tar.xz
wireguard-openbsd-5a46a4df6bea0a2e38a42058c43eb9a981d20a2c.zip
more strcpy fixes
Diffstat (limited to 'usr.sbin/bind/lib/isc/unix/socket.c')
-rw-r--r--usr.sbin/bind/lib/isc/unix/socket.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.sbin/bind/lib/isc/unix/socket.c b/usr.sbin/bind/lib/isc/unix/socket.c
index 97822cef4e2..5f6583dc5e4 100644
--- a/usr.sbin/bind/lib/isc/unix/socket.c
+++ b/usr.sbin/bind/lib/isc/unix/socket.c
@@ -3127,7 +3127,7 @@ isc_socket_permunix(isc_sockaddr_t *sockaddr, isc_uint32_t perm,
REQUIRE(sockaddr->type.sa.sa_family == AF_UNIX);
INSIST(strlen(sockaddr->type.sunix.sun_path) < sizeof(path));
- strcpy(path, sockaddr->type.sunix.sun_path);
+ strlcpy(path, sockaddr->type.sunix.sun_path, sizeof(path));
#ifdef NEED_SECURE_DIRECTORY
slash = strrchr(path, '/');
@@ -3135,9 +3135,9 @@ isc_socket_permunix(isc_sockaddr_t *sockaddr, isc_uint32_t perm,
if (slash != path)
*slash = '\0';
else
- strcpy(path, "/");
+ strlcpy(path, "/", sizeof(path));
} else
- strcpy(path, ".");
+ strlcpy(path, ".", sizeof(path));
#endif
if (chmod(path, perm) < 0) {