projects
/
open-adventure.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
Bound the sizes of strcpy.
[open-adventure.git]
/
actions.c
diff --git
a/actions.c
b/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;
- str
cpy(command->raw1, command->raw2
);
+ str
ncpy(command->raw1, command->raw2, LINESIZE - 1
);
}
char word1[TOKLEN + 1];
packed_to_token(command->wd1, word1);