diff --git a/libexec/ftpd/ftpd.c b/libexec/ftpd/ftpd.c index e41ffd253b0b..38fc9ebb4778 100644 --- a/libexec/ftpd/ftpd.c +++ b/libexec/ftpd/ftpd.c @@ -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