[sr-dev] git:master:e4d17429: dialog: secure space in case \r\n needs to be added after extra headers

Daniel-Constantin Mierla miconda at gmail.com
Wed Nov 2 15:47:31 CET 2016


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

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2016-11-02T15:08:42+01:00

dialog: secure space in case \r\n needs to be added after extra headers

---

Modified: modules/dialog/dlg_req_within.c

---

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

---

diff --git a/modules/dialog/dlg_req_within.c b/modules/dialog/dlg_req_within.c
index c2f9772..8293b85 100644
--- a/modules/dialog/dlg_req_within.c
+++ b/modules/dialog/dlg_req_within.c
@@ -329,7 +329,7 @@ static inline int build_extra_hdr(struct dlg_cell * cell, str *extra_hdrs,
 	if(extra_hdrs && extra_hdrs->len>0)
 		str_hdr->len += extra_hdrs->len;
 
-	blen = str_hdr->len + 1 /* '\0' */;
+	blen = str_hdr->len + 3 /* '\r\n\0' */;
 
 	/* reserve space for callee headers in local requests */
 	if(dlg_lreq_callee_headers.len>0)




More information about the sr-dev mailing list