Module: kamailio
Branch: master
Commit: 220f2e3a36a7d7f00c77ef6f8cc495b3ff995b01
URL:
https://github.com/kamailio/kamailio/commit/220f2e3a36a7d7f00c77ef6f8cc495b…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)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/220f2e3a36a7d7f00c77ef6f8cc495b…
Patch:
https://github.com/kamailio/kamailio/commit/220f2e3a36a7d7f00c77ef6f8cc495b…
---
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;