From 415860ebaeb990c0c8da27cc7aa565a137b97fe9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 27 Jul 2017 01:08:15 +0300 Subject: Fix possible buffer overflows with snprintf. --- src/map/status.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/map/status.c') 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; -- cgit v1.2.3-70-g09d2