Bound the sizes of strcpy.
[open-adventure.git] / main.c
diff --git a/main.c b/main.c
index c3fc353c22281231c0db22ed137416c8d2868435..6457d055068984a423d0cf575d5a167c8039bbd3 100644 (file)
--- a/main.c
+++ b/main.c
@@ -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;