Skip to content

Commit

Permalink
Use strlcpy instead of strcpy
Browse files Browse the repository at this point in the history
  • Loading branch information
alandekok committed Feb 17, 2013
1 parent e6f6cec commit 1b49c9e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/modules/rlm_mschap/smbencrypt.c
Expand Up @@ -81,7 +81,7 @@ int main (int argc, char *argv[])
fprintf(stderr, "--------------------------------\t--------------------------------\n");
fflush(stderr);
for (i = 1; i < argc; i++ ) {
strcpy(password, argv[i]);
strlcpy(password, argv[i], sizeof(password));
l = strlen(password);
if (l && password[l-1] == '\n') password [l-1] = 0;
smbdes_lmpwdhash(password, hash);
Expand Down

0 comments on commit 1b49c9e

Please sign in to comment.