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

2
main.c
View file

@ -1197,7 +1197,7 @@ Laction:
case GO_WORD2:
/* Get second word for analysis. */
command.wd1 = command.wd2;
strcpy(command.raw1, command.raw2);
strncpy(command.raw1, command.raw2, LINESIZE - 1);
wordclear(&command.wd2);
command.raw2[0] = '\0';
goto L2620;