]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
mod_sofia: Dereferencing a null pointer causes segfault: sofia_handle_sip_r_invite...
authorBrian West <brian@freeswitch.org>
Wed, 24 Jun 2009 16:04:05 +0000 (16:04 +0000)
committerBrian West <brian@freeswitch.org>
Wed, 24 Jun 2009 16:04:05 +0000 (16:04 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@13937 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/mod/endpoints/mod_sofia/sofia.c

index 94f4592b18dfcfb12aedcc2d3831173f9668d936..1a6dddd46477d761f4216768dd011e052f3e720e 100644 (file)
@@ -3071,7 +3071,7 @@ static void sofia_handle_sip_r_invite(switch_core_session_t *session, int status
                                                                                  p_contact->m_url->url_user, sip_redirect_dialplan, sip_redirect_context);
                                                switch_ivr_session_transfer(a_session, p_contact->m_url->url_user, sip_redirect_dialplan, sip_redirect_context);                                        
                                        } else if ((!strcmp(profile->sipip, p_contact->m_url->url_host))
-                                                          || (!strcmp(profile->extsipip, p_contact->m_url->url_host))
+                                                          || (profile->extsipip && !strcmp(profile->extsipip, p_contact->m_url->url_host))
                                                           || (switch_xml_locate_domain(p_contact->m_url->url_host, NULL, &root, &domain) == SWITCH_STATUS_SUCCESS)) {
                                                switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_DEBUG, "Redirect: Transfering to %s\n", p_contact->m_url->url_user);
                                                switch_ivr_session_transfer(a_session, p_contact->m_url->url_user, NULL, NULL);