From owner-svn-src-all@FreeBSD.ORG Thu Oct 23 00:28:21 2008 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 77E51106567A; Thu, 23 Oct 2008 00:28:21 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 6607E8FC13; Thu, 23 Oct 2008 00:28:21 +0000 (UTC) (envelope-from delphij@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id m9N0SL9l042674; Thu, 23 Oct 2008 00:28:21 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id m9N0SLnc042673; Thu, 23 Oct 2008 00:28:21 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200810230028.m9N0SLnc042673@svn.freebsd.org> From: Xin LI Date: Thu, 23 Oct 2008 00:28:21 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r184188 - head/usr.sbin/nscd X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Oct 2008 00:28:21 -0000 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;