Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Dec 2017 07:21:47 +0000 (UTC)
From:      Xin LI <delphij@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r326562 - head/libexec/ftpd
Message-ID:  <201712050721.vB57LlRS059352@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: delphij
Date: Tue Dec  5 07:21:47 2017
New Revision: 326562
URL: https://svnweb.freebsd.org/changeset/base/326562

Log:
  Use strlcpy().
  
  MFC after:	2 weeks

Modified:
  head/libexec/ftpd/ftpd.c

Modified: head/libexec/ftpd/ftpd.c
==============================================================================
--- head/libexec/ftpd/ftpd.c	Tue Dec  5 07:11:56 2017	(r326561)
+++ head/libexec/ftpd/ftpd.c	Tue Dec  5 07:21:47 2017	(r326562)
@@ -1077,7 +1077,7 @@ user(char *name)
 		}
 	}
 	if (logging)
-		strncpy(curname, name, sizeof(curname)-1);
+		strlcpy(curname, name, sizeof(curname));
 
 	pwok = 0;
 #ifdef USE_PAM



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201712050721.vB57LlRS059352>