summaryrefslogtreecommitdiff
path: root/src/map/status.c
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-07-27 01:08:15 +0300
committerAndrei Karas <akaras@inbox.ru>2017-07-27 01:40:12 +0300
commit415860ebaeb990c0c8da27cc7aa565a137b97fe9 (patch)
tree379bc512894f445da63207d58c0956ea503a5f01 /src/map/status.c
parent30ba171e28b10c5f9355cab5902fa311a234d833 (diff)
downloadhercules-415860ebaeb990c0c8da27cc7aa565a137b97fe9.tar.gz
hercules-415860ebaeb990c0c8da27cc7aa565a137b97fe9.tar.bz2
hercules-415860ebaeb990c0c8da27cc7aa565a137b97fe9.tar.xz
hercules-415860ebaeb990c0c8da27cc7aa565a137b97fe9.zip
Fix possible buffer overflows with snprintf.
Diffstat (limited to 'src/map/status.c')
-rw-r--r--src/map/status.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/status.c b/src/map/status.c
index 7836b414d..166b33e6f 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -13416,7 +13416,7 @@ int status_readdb_refine_libconfig(const char *filename)
char filepath[256];
int i = 0, count = 0;
- sprintf(filepath, "%s/%s", map->db_path, filename);
+ safesnprintf(filepath, sizeof(filepath), "%s/%s", map->db_path, filename);
if (!libconfig->load_file(&refine_db_conf, filepath))
return 0;