summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNo Name <remoit(DOT)nane(AT)gmail(DOT)com>2010-02-19 19:56:02 -0800
committerJared Adams <jaxad0127@gmail.com>2010-02-21 21:18:55 -0700
commit331129f03caffa6fc7f7a4d730623e88b8d8fc4f (patch)
tree524cffb06633cda244f82ab2e37da7d362dfb782
parentd6c7054a1818434b4880eb9365593b5018429aa2 (diff)
downloadtmwa-331129f03caffa6fc7f7a4d730623e88b8d8fc4f.tar.gz
tmwa-331129f03caffa6fc7f7a4d730623e88b8d8fc4f.tar.bz2
tmwa-331129f03caffa6fc7f7a4d730623e88b8d8fc4f.tar.xz
tmwa-331129f03caffa6fc7f7a4d730623e88b8d8fc4f.zip
Pad server whisper name with null characters.
Prevents server whisper name from containing other trailing data as memcpy will not check for a terminating null character in the source.
-rw-r--r--src/char/char.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/char/char.c b/src/char/char.c
index 27e9a1c..63a84fd 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -3865,7 +3865,7 @@ int char_config_read (const char *cfgName)
{
if (strlen (w2) >= 4)
{
- memcpy (wisp_server_name, w2, sizeof (wisp_server_name));
+ strncpy (wisp_server_name, w2, sizeof (wisp_server_name));
wisp_server_name[sizeof (wisp_server_name) - 1] = '\0';
}
}