From 638e2b5c985c13a8138d1cb166d5fdb8148b690c Mon Sep 17 00:00:00 2001 From: shennetsind Date: Thu, 31 Jan 2013 16:11:07 -0200 Subject: Fixed Bug #3080 Replaced strncpy with safestrncpy where I found would be beneficial. http://hercules.ws/board/tracker/issue-3080-safestrncpy-instead-of-strncpy-where-applicable/ Also modifying headers accordingly. Signed-off-by: shennetsind --- src/map/map.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src/map/map.c') diff --git a/src/map/map.c b/src/map/map.c index a8521de7d..d2cc9c4a9 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -1,5 +1,6 @@ -// Copyright (c) Athena Dev Teams - Licensed under GNU GPL -// For more information, see LICENCE in the main folder +// Copyright (c) Hercules dev team, licensed under GNU GPL. +// See the LICENSE file +// Portions Copyright (c) Athena dev team #include "../common/cbasetypes.h" #include "../common/core.h" @@ -3216,7 +3217,7 @@ int map_config_read(char *cfgName) *ptr = '\0'; if(strcmpi(w1,"timestamp_format")==0) - strncpy(timestamp_format, w2, 20); + safestrncpy(timestamp_format, w2, 20); else if(strcmpi(w1,"stdout_with_ansisequence")==0) stdout_with_ansisequence = config_switch(w2); else if(strcmpi(w1,"console_silent")==0) { @@ -3267,7 +3268,7 @@ int map_config_read(char *cfgName) else if (strcmpi(w1, "charhelp_txt") == 0) strcpy(charhelp_txt, w2); else if(strcmpi(w1,"db_path") == 0) - strncpy(db_path,w2,255); + safestrncpy(db_path,w2,255); else if (strcmpi(w1, "console") == 0) { console = config_switch(w2); if (console) -- cgit v1.2.3-60-g2f50