mirror of https://github.com/sipwise/kamailio.git
Change-Id: Icf6177853298f4b7d746e928aedb0c55227a3615changes/41/36141/2
parent
b3872eb0c5
commit
2c3ea647fc
@ -0,0 +1,26 @@
|
||||
From e1a3e0d6f21507bc6f6ccb2e50a03c19872ff04b Mon Sep 17 00:00:00 2001
|
||||
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 7582bec61..5f73a05bc 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 {
|
||||
--
|
||||
2.20.1
|
||||
|
||||
Loading…
Reference in new issue