Module: kamailio
Branch: 4.2
Commit: eaa70af07b201a255ba593e102631818df4fe119
URL:
https://github.com/kamailio/kamailio/commit/eaa70af07b201a255ba593e10263181…
Author: Daniel-Constantin Mierla <miconda(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-09-20T18:52:57+02:00
tmx: safety check for bad cseq header in t_precheck_tran()
- reported by GH#331
(cherry picked from commit 3e84157b4bbce9c6bcb8c4563910811a7eb8f019)
(cherry picked from commit 578200cd2f32dfcc45b1b1fe682a907cf21083e8)
---
Modified: modules/tmx/tmx_pretran.c
---
Diff:
https://github.com/kamailio/kamailio/commit/eaa70af07b201a255ba593e10263181…
Patch:
https://github.com/kamailio/kamailio/commit/eaa70af07b201a255ba593e10263181…
---
diff --git a/modules/tmx/tmx_pretran.c b/modules/tmx/tmx_pretran.c
index 1e0f50f..631618a 100644
--- a/modules/tmx/tmx_pretran.c
+++ b/modules/tmx/tmx_pretran.c
@@ -204,7 +204,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");