svn commit: r326562 - head/libexec/ftpd

Xin LI delphij at FreeBSD.org
Tue Dec 5 07:21:49 UTC 2017


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


More information about the svn-src-head mailing list