[Freeswitch-trunk] [commit] r13937 - freeswitch/trunk/src/mod/endpoints/mod_sofia

FreeSWITCH SVN brian at freeswitch.org
Wed Jun 24 09:04:05 PDT 2009


Author: brian
Date: Wed Jun 24 11:04:05 2009
New Revision: 13937

Log:
mod_sofia: Dereferencing a null pointer causes segfault: sofia_handle_sip_r_invite doesn't check profile->extsipip before use (FSCORE-386)

Modified:
   freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c

Modified: freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c
==============================================================================
--- freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	(original)
+++ freeswitch/trunk/src/mod/endpoints/mod_sofia/sofia.c	Wed Jun 24 11:04:05 2009
@@ -3071,7 +3071,7 @@
 										  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);



More information about the Freeswitch-trunk mailing list