From be08be711cde5e375ec2ea50020483aa967fe67f Mon Sep 17 00:00:00 2001 From: delphij Date: Thu, 23 Oct 2008 00:28:21 +0000 Subject: Use strlcpy() before strlen() instead of strncpy(). --- usr.sbin/nscd/nscdcli.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'usr.sbin/nscd') 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; -- cgit v1.1