Skip to content

Commit

Permalink
Better to use strncpy and avoid explosions.
Browse files Browse the repository at this point in the history
  • Loading branch information
meh committed Jun 14, 2012
1 parent 7fbb75a commit 9c81c2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion nucular/security.d
Original file line number Diff line number Diff line change
Expand Up @@ -849,7 +849,7 @@ private extern (C):
{
char* password = cast (char*) userdata;

strcpy(buf, password);
strncpy(buf, password, bufsize - 1);

return strlen(password).to!int;
}
Expand Down

0 comments on commit 9c81c2c

Please sign in to comment.