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

FreeSWITCH SVN brian at freeswitch.org
Sun Feb 1 13:59:50 PST 2009


Author: brian
Date: Sun Feb  1 15:59:50 2009
New Revision: 11589

Log:
make sure sip->sip_request->rq_url->url_user exists before you strncmp on it.

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	Sun Feb  1 15:59:50 2009
@@ -103,7 +103,7 @@
 	*/
 	if (profile->manage_shared_appearance) {
 		
-		if (!strncmp(sip->sip_request->rq_url->url_user, "sla-agent", sizeof("sla-agent"))) {
+		if (sip->sip_request->rq_url->url_user && !strncmp(sip->sip_request->rq_url->url_user, "sla-agent", sizeof("sla-agent"))) {
 			int sub_state;
 			tl_gets(tags, NUTAG_SUBSTATE_REF(sub_state), TAG_END());
 			



More information about the Freeswitch-svn mailing list