Module: kamailio
Branch: master
Commit: 913ba6f196d19005a0e93ad0dbbdc48f532a9897
URL:
https://github.com/kamailio/kamailio/commit/913ba6f196d19005a0e93ad0dbbdc48…
Author: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Committer: Victor Seva <linuxmaniac(a)torreviejawireless.org>
Date: 2019-12-09T09:12:05+01:00
pv_headers: use snprintf instead of sprintf
---
Modified: src/modules/pv_headers/pvh_xavp.c
---
Diff:
https://github.com/kamailio/kamailio/commit/913ba6f196d19005a0e93ad0dbbdc48…
Patch:
https://github.com/kamailio/kamailio/commit/913ba6f196d19005a0e93ad0dbbdc48…
---
diff --git a/src/modules/pv_headers/pvh_xavp.c b/src/modules/pv_headers/pvh_xavp.c
index de296b4bca..fa7fe1b9e1 100644
--- a/src/modules/pv_headers/pvh_xavp.c
+++ b/src/modules/pv_headers/pvh_xavp.c
@@ -384,7 +384,7 @@ int pvh_get_branch_xname(struct sip_msg *msg, str *xname, str *dst)
pvh_get_branch_index(msg, &br_idx);
if(br_idx > 0) {
- sprintf(br_idx_s, "%d", br_idx - 1);
+ snprintf(br_idx_s, 32, "%d", br_idx - 1);
br_idx_len = strlen(br_idx_s);
memcpy(dst->s + os, ".", 1);
os += 1;