Skip to content

Commit

Permalink
tmx: safety check for bad cseq header in t_precheck_tran()
Browse files Browse the repository at this point in the history
- reported by GH#331

(cherry picked from commit 3e84157)
  • Loading branch information
miconda committed Sep 20, 2015
1 parent 7881ec8 commit 578200c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion modules/tmx/tmx_pretran.c
Expand Up @@ -210,7 +210,10 @@ int tmx_check_pretran(sip_msg_t *msg)
LM_ERR("failed to parse required headers\n");
return -1;
}

if(msg->cseq==NULL || msg->cseq->parsed==NULL) {
LM_ERR("failed to parse cseq headers\n");
return -1;
}
if(get_cseq(msg)->method_id==METHOD_ACK
|| get_cseq(msg)->method_id==METHOD_CANCEL) {
LM_DBG("no pre-transaction management for ACK or CANCEL\n");
Expand Down

0 comments on commit 578200c

Please sign in to comment.