[sr-dev] git:master:220f2e3a: dialog: extra headers for dlg_bridge() built with memcpy

Daniel-Constantin Mierla miconda at gmail.com
Thu Jul 27 11:35:18 CEST 2017


Module: kamailio
Branch: master
Commit: 220f2e3a36a7d7f00c77ef6f8cc495b3ff995b01
URL: https://github.com/kamailio/kamailio/commit/220f2e3a36a7d7f00c77ef6f8cc495b3ff995b01

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2017-07-27T11:10:01+02:00

dialog: extra headers for dlg_bridge() built with memcpy

---

Modified: src/modules/dialog/dlg_transfer.c

---

Diff:  https://github.com/kamailio/kamailio/commit/220f2e3a36a7d7f00c77ef6f8cc495b3ff995b01.diff
Patch: https://github.com/kamailio/kamailio/commit/220f2e3a36a7d7f00c77ef6f8cc495b3ff995b01.patch

---

diff --git a/src/modules/dialog/dlg_transfer.c b/src/modules/dialog/dlg_transfer.c
index c7da054da0..74d43726ad 100644
--- a/src/modules/dialog/dlg_transfer.c
+++ b/src/modules/dialog/dlg_transfer.c
@@ -68,11 +68,11 @@ int dlg_bridge_init_hdrs(void)
 		LM_ERR("no more pkg memory\n");
 		return -1;
 	}
-	strncpy(dlg_bridge_hdrs_buf,
+	memcpy(dlg_bridge_hdrs_buf,
 			"Contact: <", 10);
-	strncpy(dlg_bridge_hdrs_buf + 10,
+	memcpy(dlg_bridge_hdrs_buf + 10,
 			dlg_bridge_contact.s, dlg_bridge_contact.len);
-	strncpy(dlg_bridge_hdrs_buf + 10 + dlg_bridge_contact.len,
+	memcpy(dlg_bridge_hdrs_buf + 10 + dlg_bridge_contact.len,
 			">\r\nContent-Type: application/sdp\r\n", 34);
 	dlg_bridge_hdrs_buf[dlg_bridge_contact.len+44] = '\0';
 	dlg_bridge_inv_hdrs.s = dlg_bridge_hdrs_buf;




More information about the sr-dev mailing list