diff options
author | delphij <delphij@FreeBSD.org> | 2008-10-23 00:28:21 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2008-10-23 00:28:21 +0000 |
commit | be08be711cde5e375ec2ea50020483aa967fe67f (patch) | |
tree | 8e8f838a3e11951543c64a4ac4fc1e482d16c3e2 /usr.sbin/nscd | |
parent | 5c9667b50c351649e619bf55fc3a078e4262be26 (diff) | |
download | FreeBSD-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.c | 2 |
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; |