Author: file Date: Sat Feb 14 12:19:07 2015 New Revision: 431751 URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=431751 Log: chan_pjsip: Fix crash when CHANNEL dialplan function is invoked with pjsip argument and no type.
ASTERISK-24771 #close Reported by: Niklas Larsson Modified: branches/13/channels/pjsip/dialplan_functions.c Modified: branches/13/channels/pjsip/dialplan_functions.c URL: http://svnview.digium.com/svn/asterisk/branches/13/channels/pjsip/dialplan_functions.c?view=diff&rev=431751&r1=431750&r2=431751 ============================================================================== --- branches/13/channels/pjsip/dialplan_functions.c (original) +++ branches/13/channels/pjsip/dialplan_functions.c Sat Feb 14 12:19:07 2015 @@ -591,7 +591,10 @@ dlg = channel->session->inv_session->dlg; - if (!strcmp(type, "secure")) { + if (ast_strlen_zero(type)) { + ast_log(LOG_WARNING, "You must supply a type field for 'pjsip' informatio\n"); + return -1; + } else if (!strcmp(type, "secure")) { #ifdef HAVE_PJSIP_GET_DEST_INFO pjsip_host_info dest; pj_pool_t *pool = pjsip_endpt_create_pool(ast_sip_get_pjsip_endpoint(), "secure-check", 128, 128); -- _____________________________________________________________________ -- Bandwidth and Colocation Provided by http://www.api-digital.com -- svn-commits mailing list To UNSUBSCRIBE or update options visit: http://lists.digium.com/mailman/listinfo/svn-commits