Bound the sizes of strcpy.

This commit is contained in:
NHOrus 2017-07-08 22:06:23 +03:00 committed by Eric S. Raymond
parent a3ffa2455b
commit 53cb12b4d0
2 changed files with 2 additions and 2 deletions

View file

@ -1114,7 +1114,7 @@ static int say(struct command_t *command)
{
if (command->wd2 > 0) {
command->wd1 = command->wd2;
strcpy(command->raw1, command->raw2);
strncpy(command->raw1, command->raw2, LINESIZE - 1);
}
char word1[TOKLEN + 1];
packed_to_token(command->wd1, word1);