[sr-dev] git:master: tm: fix possible segfault in cancel_branch()

Richard Fuchs rfuchs at sipwise.com
Thu Oct 24 18:34:18 CEST 2013


Module: sip-router
Branch: master
Commit: 9a67a730df4f6c6584e8c52934d5feb16f86ee2e
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=9a67a730df4f6c6584e8c52934d5feb16f86ee2e

Author: Richard Fuchs <rfuchs at sipwise.com>
Committer: Richard Fuchs <rfuchs at sipwise.com>
Date:   Thu Oct 24 12:34:05 2013 -0400

tm: fix possible segfault in cancel_branch()

---

 modules/tm/t_cancel.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/modules/tm/t_cancel.c b/modules/tm/t_cancel.c
index ccd2212..1b39648 100644
--- a/modules/tm/t_cancel.c
+++ b/modules/tm/t_cancel.c
@@ -285,7 +285,7 @@ int cancel_branch( struct cell *t, int branch,
 			(t->uas.request && t->uas.request->msg_flags&(FL_USE_UAC_FROM|FL_USE_UAC_TO))) {
 		/* build the CANCEL from the INVITE which was sent out */
 		cancel = build_local_reparse(t, branch, &len, CANCEL, CANCEL_LEN,
-									 (t->uas.request->msg_flags&FL_USE_UAC_TO)?0:&t->to
+									 (t->uas.request && t->uas.request->msg_flags&FL_USE_UAC_TO)?0:&t->to
 	#ifdef CANCEL_REASON_SUPPORT
 									 , reason
 	#endif /* CANCEL_REASON_SUPPORT */




More information about the sr-dev mailing list