[sr-dev] git:master:7cc1d111: tmx: safety check for bad callid header in t_precheck_tran()

zxcpoiu zxcpoiu at gmail.com
Wed Sep 23 11:29:26 CEST 2015


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

Author: zxcpoiu <zxcpoiu at gmail.com>
Committer: zxcpoiu <zxcpoiu at gmail.com>
Date: 2015-09-23T17:23:40+08:00

tmx: safety check for bad callid header in t_precheck_tran()
- reported by GH#331

---

Modified: modules/tmx/tmx_pretran.c

---

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

---

diff --git a/modules/tmx/tmx_pretran.c b/modules/tmx/tmx_pretran.c
index 8ba74df..00f571b 100644
--- a/modules/tmx/tmx_pretran.c
+++ b/modules/tmx/tmx_pretran.c
@@ -227,6 +227,10 @@ int tmx_check_pretran(sip_msg_t *msg)
 		LM_ERR("failed to get From header\n");
 		return -1;
 	}
+	if (msg->callid==NULL || msg->callid->body.s==NULL) {
+		LM_ERR("failed to parse callid headers\n");
+		return -1;
+	}
 
 	vbr = msg->via1->branch;
 




More information about the sr-dev mailing list