aboutsummaryrefslogtreecommitdiffstats
path: root/main/kamailio/tmx-allocate-space-to-store-ending-0-for-branch-value.patch
blob: 43445514ac878b5d886dbeb630e45ecbae957d79 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
From e1d8008a09d9390ebaf698abe8909e10dfec4097 Mon Sep 17 00:00:00 2001
From: Daniel-Constantin Mierla <miconda@gmail.com>
Date: Sat, 10 Feb 2018 22:05:42 +0100
Subject: [PATCH] tmx: allocate space to store ending 0 for branch value

- reported by Alfred Farrugia and Sandro Gauci
---
 src/modules/tmx/tmx_pretran.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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;