[sr-dev] git:5.1:5cd6530e: tmx: allocate space to store ending 0 for branch value

Daniel-Constantin Mierla miconda at gmail.com
Sun Feb 11 08:15:45 CET 2018


Module: kamailio
Branch: 5.1
Commit: 5cd6530e68ef311a59acbec180588a498f2a32dc
URL: https://github.com/kamailio/kamailio/commit/5cd6530e68ef311a59acbec180588a498f2a32dc

Author: Daniel-Constantin Mierla <miconda at gmail.com>
Committer: Daniel-Constantin Mierla <miconda at gmail.com>
Date: 2018-02-11T08:15:12+01:00

tmx: allocate space to store ending 0 for branch value

- reported by Alfred Farrugia and Sandro Gauci

(cherry picked from commit e1d8008a09d9390ebaf698abe8909e10dfec4097)

---

Modified: src/modules/tmx/tmx_pretran.c

---

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

---

diff --git a/src/modules/tmx/tmx_pretran.c b/src/modules/tmx/tmx_pretran.c
index 494bdffe3e..67c4f7f4af 100644
--- a/src/modules/tmx/tmx_pretran.c
+++ b/src/modules/tmx/tmx_pretran.c
@@ -260,7 +260,7 @@ int tmx_check_pretran(sip_msg_t *msg)
 	if(likely(vbr!=NULL)) {
 		svbranch = vbr->value;
 		trim(&svbranch);
-		dsize += svbranch.len;
+		dsize += svbranch.len + 1;
 	}
 	if(dsize<256) dsize = 256;
 




More information about the sr-dev mailing list