Bound the sizes of strcpy.
[open-adventure.git] / actions.c
index 0aa7d9302decd3ed14d01719a5e8441d299b883d..80e534b6da793c2cebbb8e8a274dcbb75d918078 100644 (file)
--- a/actions.c
+++ b/actions.c
@@ -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);