diff --git a/src/chage.c b/src/chage.c index b8a11e8c..6896cb15 100644 --- a/src/chage.c +++ b/src/chage.c @@ -33,6 +33,7 @@ #include "pwio.h" #include "shadowio.h" #include "shadowlog.h" +#include "strlcpy.h" #ifdef WITH_TCB #include "tcbfuncs.h" #endif @@ -822,7 +823,7 @@ int main (int argc, char **argv) fail_exit (E_NOPERM); } - STRFCPY (user_name, pw->pw_name); + STRLCPY(user_name, pw->pw_name); #ifdef WITH_TCB if (shadowtcb_set_user (pw->pw_name) == SHADOWTCB_FAILURE) { fail_exit (E_NOPERM);