[sr-dev] git:master:2c052974: sipt: reset the static buffer for returning the number

Daniel-Constantin Mierla miconda at gmail.com
Thu Aug 8 18:31:42 CEST 2019


Module: kamailio
Branch: master
Commit: 2c052974263c0785eb5280a935162673ac82dc6b
URL: https://github.com/kamailio/kamailio/commit/2c052974263c0785eb5280a935162673ac82dc6b

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2019-08-08T18:31:06+02:00

sipt: reset the static buffer for returning the number

- GH #2030

---

Modified: src/modules/sipt/sipt.c

---

Diff:  https://github.com/kamailio/kamailio/commit/2c052974263c0785eb5280a935162673ac82dc6b.diff
Patch: https://github.com/kamailio/kamailio/commit/2c052974263c0785eb5280a935162673ac82dc6b.patch

---

diff --git a/src/modules/sipt/sipt.c b/src/modules/sipt/sipt.c
index e75ecdc5b4..f64686dbc7 100644
--- a/src/modules/sipt/sipt.c
+++ b/src/modules/sipt/sipt.c
@@ -339,6 +339,7 @@ static int sipt_get_redirection_number(struct sip_msg *msg, pv_param_t *param, p
 	str body;
 	body.s = get_body_part(msg, TYPE_APPLICATION,SUBTYPE_ISUP,&body.len);
 
+	sb_s_buf[0] = '\0';
 	if(body.s == NULL)
 	{
 		LM_INFO("No ISUP Message Found");
@@ -350,9 +351,9 @@ static int sipt_get_redirection_number(struct sip_msg *msg, pv_param_t *param, p
 		LM_DBG("message not an ACM or CPG\n");
 		return -1;
 	}
-	
+
 	isup_get_redirection_number((unsigned char*)body.s, body.len, sb_s_buf);
-	
+
 	if (strlen(sb_s_buf) > 0)
 	{
 		pv_get_strzval(msg, param, res, sb_s_buf);




More information about the sr-dev mailing list