From owner-svn-src-head@FreeBSD.ORG Thu May 28 21:12:44 2009 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 037D710656C9; Thu, 28 May 2009 21:12:44 +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 E5F428FC12; Thu, 28 May 2009 21:12:43 +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 n4SLChh5049878; Thu, 28 May 2009 21:12:43 GMT (envelope-from delphij@svn.freebsd.org) Received: (from delphij@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n4SLChm0049877; Thu, 28 May 2009 21:12:43 GMT (envelope-from delphij@svn.freebsd.org) Message-Id: <200905282112.n4SLChm0049877@svn.freebsd.org> From: Xin LI Date: Thu, 28 May 2009 21:12:43 +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: r192994 - head/sys/compat/svr4 X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 28 May 2009 21:12:44 -0000 Author: delphij Date: Thu May 28 21:12:43 2009 New Revision: 192994 URL: http://svn.freebsd.org/changeset/base/192994 Log: Use strlcpy(). Modified: head/sys/compat/svr4/svr4_misc.c Modified: head/sys/compat/svr4/svr4_misc.c ============================================================================== --- head/sys/compat/svr4/svr4_misc.c Thu May 28 20:28:13 2009 (r192993) +++ head/sys/compat/svr4/svr4_misc.c Thu May 28 21:12:43 2009 (r192994) @@ -370,7 +370,7 @@ again: svr4_dirent.d_off = (svr4_off_t)(off + reclen); svr4_dirent.d_reclen = (u_short) svr4reclen; } - strcpy(svr4_dirent.d_name, bdp->d_name); + strlcpy(svr4_dirent.d_name, bdp->d_name, sizeof(svr4_dirent.d_name)); if ((error = copyout((caddr_t)&svr4_dirent, outp, svr4reclen))) goto out; inp += reclen; @@ -511,7 +511,7 @@ again: idb.d_ino = (svr4_ino_t)bdp->d_fileno; idb.d_off = (svr4_off_t)off; idb.d_reclen = (u_short)svr4_reclen; - strcpy(idb.d_name, bdp->d_name); + strlcpy(idb.d_name, bdp->d_name, sizeof(idb.d_name)); if ((error = copyout((caddr_t)&idb, outp, svr4_reclen))) goto out; /* advance past this real entry */