Module: kamailio
Branch: 4.3
Commit: 7ac3eea0c49872a75d384e94ee0b4380caf440e0
URL:
https://github.com/kamailio/kamailio/commit/7ac3eea0c49872a75d384e94ee0b438…
Author: jaybeepee <jason.penton(a)gmail.com>
Committer: Daniel-Constantin Mierla <miconda(a)gmail.com>
Date: 2015-09-17T13:22:26+02:00
modules/tm: precent possible seg fault if branch reply is null
(cherry picked from commit aec9850491a8e8fa919396ae0e0f1d99d30c607c)
---
Modified: modules/tm/t_suspend.c
---
Diff:
https://github.com/kamailio/kamailio/commit/7ac3eea0c49872a75d384e94ee0b438…
Patch:
https://github.com/kamailio/kamailio/commit/7ac3eea0c49872a75d384e94ee0b438…
---
diff --git a/modules/tm/t_suspend.c b/modules/tm/t_suspend.c
index 86fb3be..de18a2a 100644
--- a/modules/tm/t_suspend.c
+++ b/modules/tm/t_suspend.c
@@ -298,7 +298,13 @@ int t_continue(unsigned int hash_index, unsigned int label,
LM_DBG("continuing from a suspended reply"
" - resetting the suspend branch flag\n");
+ if (t->uac[branch].reply) {
t->uac[branch].reply->msg_flags &= ~FL_RPL_SUSPENDED;
+ } else {
+ LM_WARN("no reply in t_continue for branch. not much we can do\n");
+ return 0;
+ }
+
if (t->uas.request) t->uas.request->msg_flags&= ~FL_RPL_SUSPENDED;
faked_env( t, t->uac[branch].reply, 1);