From 60541ccfaf3b08e9df8e29584babd5c475dc1248 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Sun, 25 Apr 2004 13:09:41 +0000 Subject: [PATCH] (flash, wall): Long arguments could smash the stack; fix insufficient buffers. Closes #940792. (wall): Don't strip first word from message. Closes #940790. --- src/lib/commands/flash.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/lib/commands/flash.c b/src/lib/commands/flash.c index f2e7df9f..77cb6dae 100644 --- a/src/lib/commands/flash.c +++ b/src/lib/commands/flash.c @@ -44,7 +44,7 @@ flash(void) { struct natstr *us; struct natstr *to; - s_char buf[600]; + s_char buf[1024]; int tocn; s_char *sp; @@ -94,13 +94,12 @@ int wall(void) { struct natstr *us; - s_char buf[600]; + s_char buf[1024]; s_char *sp; us = getnatp(player->cnum); if (player->argp[1]) { for (sp = &player->combuf[0]; *sp && *sp != ' '; ++sp) ; - for (++sp; *sp && *sp != ' '; ++sp) ; sprintf(buf, ":%s", sp); sendmessage(us, 0, buf, 1); } else {