svn commit: r184188 - head/usr.sbin/nscd
Xin LI
delphij at FreeBSD.org
Thu Oct 23 00:28:21 UTC 2008
Author: delphij
Date: Thu Oct 23 00:28:21 2008
New Revision: 184188
URL: http://svn.freebsd.org/changeset/base/184188
Log:
Use strlcpy() before strlen() instead of strncpy().
Modified:
head/usr.sbin/nscd/nscdcli.c
Modified: head/usr.sbin/nscd/nscdcli.c
==============================================================================
--- head/usr.sbin/nscd/nscdcli.c Thu Oct 23 00:27:35 2008 (r184187)
+++ head/usr.sbin/nscd/nscdcli.c Thu Oct 23 00:28:21 2008 (r184188)
@@ -187,7 +187,7 @@ open_nscd_connection__(struct nscd_conne
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;
More information about the svn-src-head
mailing list