]> git.pond.sub.org Git - empserver/commitdiff
(flash, wall): Long arguments could smash the stack; fix insufficient
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 25 Apr 2004 13:09:41 +0000 (13:09 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 25 Apr 2004 13:09:41 +0000 (13:09 +0000)
buffers.  Closes #940792.

(wall): Don't strip first word from message.  Closes #940790.

src/lib/commands/flash.c

index f2e7df9f410db5a092ec6823decd8da408b8babb..77cb6dae96694fe6e554ec8b94929b8767e52fb0 100644 (file)
@@ -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 {