Kill remaining strcpy(), the programmer's guide says username is 32 bytes.

This commit is contained in:
Todd C. Miller
2003-03-16 03:03:32 +00:00
parent d2ced184ec
commit ecee620389

View File

@@ -99,7 +99,8 @@ securid_setup(pw, promptp, auth)
/* Re-initialize SecurID every time. */
if (sd_init(sd) == 0) {
strcpy(sd->username, pw->pw_name);
/* The programmer's guide says username is 32 bytes */
strlcpy(sd->username, pw->pw_name, 32);
return(AUTH_SUCCESS);
} else {
(void) fprintf(stderr, "%s: Cannot contact SecurID server\n", Argv[0]);