From 0edea416cc77a6ab8c721629f8d05f6c742f2684 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Sat, 13 Jan 2007 03:28:08 +0000 Subject: [PATCH] Avoiding Segfaults from buggy depend libs git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3953 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/mod/endpoints/mod_sofia/mod_sofia.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/mod/endpoints/mod_sofia/mod_sofia.c b/src/mod/endpoints/mod_sofia/mod_sofia.c index 3369deb850..4b16c79e19 100644 --- a/src/mod/endpoints/mod_sofia/mod_sofia.c +++ b/src/mod/endpoints/mod_sofia/mod_sofia.c @@ -2152,6 +2152,11 @@ static uint8_t negotiate_sdp(switch_core_session_t *session, sdp_session_t *sdp) channel = switch_core_session_get_channel(session); + if (!sdp->sdp_connection) { + switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Cannot find a c= line in the sdp!\n"); + return 0; + } + if ((tech_pvt->origin = switch_core_session_strdup(session, (char *) sdp->sdp_origin->o_username))) { if (strstr(tech_pvt->origin, "CiscoSystemsSIP-GW-UserAgent")) { switch_set_flag_locked(tech_pvt, TFLAG_BUGGY_2833);