Module: kamailio Branch: master Commit: 1191ab4e5e03b35714ec1ad9d9bf2dd9665c71fd URL: https://github.com/kamailio/kamailio/commit/1191ab4e5e03b35714ec1ad9d9bf2dd9...
Author: Daniel-Constantin Mierla miconda@gmail.com Committer: Daniel-Constantin Mierla miconda@gmail.com Date: 2023-12-13T12:02:01+01:00
tm: check get_t() result for consistency
---
Modified: src/modules/tm/tm.c
---
Diff: https://github.com/kamailio/kamailio/commit/1191ab4e5e03b35714ec1ad9d9bf2dd9... Patch: https://github.com/kamailio/kamailio/commit/1191ab4e5e03b35714ec1ad9d9bf2dd9...
---
diff --git a/src/modules/tm/tm.c b/src/modules/tm/tm.c index 67b954b03c8..b2866a685cc 100644 --- a/src/modules/tm/tm.c +++ b/src/modules/tm/tm.c @@ -2565,6 +2565,10 @@ int t_check_trans(struct sip_msg *msg) return 1; case 1: /* found */ t = get_t(); + if(t == NULL || t == T_UNDEFINED) { + LM_WARN("unexpected transaction value\n"); + return -1; + } if(msg->REQ_METHOD == METHOD_ACK) { /* ack to neg. reply or ack to local trans. * => process it and end the script */