summaryrefslogtreecommitdiffstats
path: root/usr.sbin/nscd
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2008-10-23 00:28:21 +0000
committerdelphij <delphij@FreeBSD.org>2008-10-23 00:28:21 +0000
commitbe08be711cde5e375ec2ea50020483aa967fe67f (patch)
tree8e8f838a3e11951543c64a4ac4fc1e482d16c3e2 /usr.sbin/nscd
parent5c9667b50c351649e619bf55fc3a078e4262be26 (diff)
downloadFreeBSD-src-be08be711cde5e375ec2ea50020483aa967fe67f.zip
FreeBSD-src-be08be711cde5e375ec2ea50020483aa967fe67f.tar.gz
Use strlcpy() before strlen() instead of strncpy().
Diffstat (limited to 'usr.sbin/nscd')
-rw-r--r--usr.sbin/nscd/nscdcli.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/usr.sbin/nscd/nscdcli.c b/usr.sbin/nscd/nscdcli.c
index c7a7931..3b6996d 100644
--- a/usr.sbin/nscd/nscdcli.c
+++ b/usr.sbin/nscd/nscdcli.c
@@ -187,7 +187,7 @@ open_nscd_connection__(struct nscd_connection_params const *params)
client_socket = socket(PF_LOCAL, SOCK_STREAM, 0);
client_address.sun_family = PF_LOCAL;
- strncpy(client_address.sun_path, params->socket_path,
+ strlcpy(client_address.sun_path, params->socket_path,
sizeof(client_address.sun_path));
client_address_len = sizeof(client_address.sun_family) +
strlen(client_address.sun_path) + 1;
OpenPOWER on IntegriCloud