[sr-dev] git:4.4:be854087: tmx: allocate space to store ending 0 for branch value

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


Module: kamailio
Branch: 4.4
Commit: be85408733333f20792de7f1144f987cf9f5b666
URL: https://github.com/kamailio/kamailio/commit/be85408733333f20792de7f1144f987cf9f5b666

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

tmx: allocate space to store ending 0 for branch value

- reported by Alfred Farrugia and Sandro Gauci

(cherry picked from commit e1d8008a09d9390ebaf698abe8909e10dfec4097)
(cherry picked from commit 7d783adc7de603972966f50106471c06a6be2fac)

---

Modified: modules/tmx/tmx_pretran.c

---

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

---

diff --git a/modules/tmx/tmx_pretran.c b/modules/tmx/tmx_pretran.c
index 00f571bb4a..b92f28befb 100644
--- a/modules/tmx/tmx_pretran.c
+++ b/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