svn commit: r327019 - stable/10/libexec/ftpd

Xin LI delphij at FreeBSD.org
Wed Dec 20 07:18:08 UTC 2017


Author: delphij
Date: Wed Dec 20 07:18:07 2017
New Revision: 327019
URL: https://svnweb.freebsd.org/changeset/base/327019

Log:
  MFC r326562: Use strlcpy().

Modified:
  stable/10/libexec/ftpd/ftpd.c
Directory Properties:
  stable/10/   (props changed)

Modified: stable/10/libexec/ftpd/ftpd.c
==============================================================================
--- stable/10/libexec/ftpd/ftpd.c	Wed Dec 20 07:16:41 2017	(r327018)
+++ stable/10/libexec/ftpd/ftpd.c	Wed Dec 20 07:18:07 2017	(r327019)
@@ -1064,7 +1064,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-all mailing list