diff options
author | Helmut Grohne <helmut@subdivi.de> | 2010-01-19 20:34:06 +0100 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-01-19 18:39:39 +0000 |
commit | dc0c8b2ca0f3867f1b4641092b9f90738ca8c7af (patch) | |
tree | 97d4fdd9658f0c9229e7d57bb8b71ef9f889bd62 /src/map/tmw.c | |
parent | ea5866863cbdad80eb69351417018c6104c5f43b (diff) | |
download | tmwa-dc0c8b2ca0f3867f1b4641092b9f90738ca8c7af.tar.gz tmwa-dc0c8b2ca0f3867f1b4641092b9f90738ca8c7af.tar.bz2 tmwa-dc0c8b2ca0f3867f1b4641092b9f90738ca8c7af.tar.xz tmwa-dc0c8b2ca0f3867f1b4641092b9f90738ca8c7af.zip |
fixed a buffer overrun and use of uninitialized
The target buffer for the memcpy only takes like 24 chars.
strcat on an uninitialized buffer is a bad idea.
Diffstat (limited to 'src/map/tmw.c')
-rw-r--r-- | src/map/tmw.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/tmw.c b/src/map/tmw.c index 2849983..3c506c5 100644 --- a/src/map/tmw.c +++ b/src/map/tmw.c @@ -146,7 +146,7 @@ void tmw_GmHackMsg (const char *fmt, ...) va_end (ap); char outbuf[512 + 5]; - strcat (outbuf, "[GM] "); + strcpy (outbuf, "[GM] "); strcat (outbuf, buf); intif_wis_message_to_gm (wisp_server_name, |