Module: kamailio
Branch: master
Commit: 3e84157b4bbce9c6bcb8c4563910811a7eb8f019
URL:
https://github.com/kamailio/kamailio/commit/3e84157b4bbce9c6bcb8c4563910811…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-09-20T18:48:18+02:00
tmx: safety check for bad cseq header in t_precheck_tran()
- reported by GH#331
---
Modified: modules/tmx/tmx_pretran.c
---
Diff:
https://github.com/kamailio/kamailio/commit/3e84157b4bbce9c6bcb8c4563910811…
Patch:
https://github.com/kamailio/kamailio/commit/3e84157b4bbce9c6bcb8c4563910811…
---
diff --git a/modules/tmx/tmx_pretran.c b/modules/tmx/tmx_pretran.c
index 1691432..8ba74df 100644
--- a/modules/tmx/tmx_pretran.c
+++ b/modules/tmx/tmx_pretran.c
@@ -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");