From 331129f03caffa6fc7f7a4d730623e88b8d8fc4f Mon Sep 17 00:00:00 2001 From: No Name Date: Fri, 19 Feb 2010 19:56:02 -0800 Subject: 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. --- src/char/char.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/char') 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'; } } -- cgit v1.2.3-60-g2f50