From: Victor Seva <linuxmaniac@torreviejawireless.org>
Date: Mon, 9 Dec 2019 09:19:17 +0100
Subject: [PATCH] cfgt: use snprintf instead of sprintf

---
 src/modules/cfgt/cfgt_int.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/modules/cfgt/cfgt_int.c b/src/modules/cfgt/cfgt_int.c
index 7582bec..5f73a05 100644
--- a/src/modules/cfgt/cfgt_int.c
+++ b/src/modules/cfgt/cfgt_int.c
@@ -112,7 +112,8 @@ void _cfgt_remove_report(const str *scen)
 					continue;
 				}
 			}
-			sprintf(filepath.s, "%s/%s", dest.s, next_file->d_name);
+			snprintf(filepath.s, dest.len + 1, "%s/%s", dest.s,
+				next_file->d_name);
 			if(remove(filepath.s) < 0) {
 				LM_ERR("failed removing file: %s\n", strerror(errno));
 			} else {
