From 7cc1d1113e8e461656d55595f1a268d345d2676b Mon Sep 17 00:00:00 2001 From: zxcpoiu Date: Wed, 23 Sep 2015 17:23:40 +0800 Subject: [PATCH] tmx: safety check for bad callid header in t_precheck_tran() - reported by GH#331 --- modules/tmx/tmx_pretran.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/tmx/tmx_pretran.c b/modules/tmx/tmx_pretran.c index 8ba74df4fb7..00f571bb4a8 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;