Module: kamailio
Branch: master
Commit: 7cc1d1113e8e461656d55595f1a268d345d2676b
URL:
https://github.com/kamailio/kamailio/commit/7cc1d1113e8e461656d55595f1a268d…
Author: zxcpoiu <zxcpoiu(a)gmail.com>
Committer: zxcpoiu <zxcpoiu(a)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/7cc1d1113e8e461656d55595f1a268d…
Patch:
https://github.com/kamailio/kamailio/commit/7cc1d1113e8e461656d55595f1a268d…
---
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;