Module: kamailio
Branch: 4.3
Commit: 578200cd2f32dfcc45b1b1fe682a907cf21083e8
URL:
https://github.com/kamailio/kamailio/commit/578200cd2f32dfcc45b1b1fe682a907…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-09-20T18:51:37+02:00
tmx: safety check for bad cseq header in t_precheck_tran()
- reported by GH#331
(cherry picked from commit 3e84157b4bbce9c6bcb8c4563910811a7eb8f019)
---
Modified: modules/tmx/tmx_pretran.c
---
Diff:
https://github.com/kamailio/kamailio/commit/578200cd2f32dfcc45b1b1fe682a907…
Patch:
https://github.com/kamailio/kamailio/commit/578200cd2f32dfcc45b1b1fe682a907…
---
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");