Hi,

cancel_branch (t_cancel.c) contains a segfault in lines 284-288 when
cfg_get(tm, tm_cfg, reparse_invite) is true but t->uas.request is NULL.
My suggested fix is below but I'm not 100% sure if this is really correct.

cheers
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 */

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
sr-dev mailing list
[email protected]
http://lists.sip-router.org/cgi-bin/mailman/listinfo/sr-dev

Reply via email to