[sr-dev] git:master:9e561732: core: fix offset to in hdr add helper added recently

Daniel-Constantin Mierla miconda at gmail.com
Mon Jul 11 15:40:48 CEST 2016


Module: kamailio
Branch: master
Commit: 9e5617324f1194f20e4292446922695439e2f9d7
URL: https://github.com/kamailio/kamailio/commit/9e5617324f1194f20e4292446922695439e2f9d7

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2016-07-11T15:38:24+02:00

core: fix offset to in hdr add helper added recently

- one char was jumped over

---

Modified: data_lump.c

---

Diff:  https://github.com/kamailio/kamailio/commit/9e5617324f1194f20e4292446922695439e2f9d7.diff
Patch: https://github.com/kamailio/kamailio/commit/9e5617324f1194f20e4292446922695439e2f9d7.patch

---

diff --git a/data_lump.c b/data_lump.c
index afd1704..1431222 100644
--- a/data_lump.c
+++ b/data_lump.c
@@ -766,7 +766,7 @@ int sr_hdr_add_zz(sip_msg_t *msg, char *hname, char *hbody)
 	memcpy(h.s, sname.s, sname.len);
 	memcpy(h.s+sname.len, ": ", 2);
 	memcpy(h.s+sname.len+2, sbody.s, sbody.len);
-	memcpy(h.s+sname.len+2+sbody.len+1, CRLF, CRLF_LEN);
+	memcpy(h.s+sname.len+2+sbody.len, CRLF, CRLF_LEN);
 	h.s[h.len] = '\0';
 	if (insert_new_lump_before(anchor, h.s, h.len, 0) == 0)
 	{




More information about the sr-dev mailing list