Author: kharwell Date: Thu Oct 30 16:14:01 2014 New Revision: 426781 URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=426781 Log: res_pjsip_exten_state: PJSIPShowSubscriptionsInbound causes crash
Currently, it is possible for some subscriptions to get into a NULL state. When this occurs and the PJSIPShowSubscriptionsInbound ami action is issued and a device is subscribed for extension state then the associated subscription state object can't be located. The code then attempts to dereference a NULL object. Added a NULL check to avoid the problem. Reported by: John Bigelow ........ Merged revisions 426779 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 426780 from http://svn.asterisk.org/svn/asterisk/branches/13 Modified: trunk/ (props changed) trunk/res/res_pjsip_exten_state.c Propchange: trunk/ ------------------------------------------------------------------------------ Binary property 'branch-13-merged' - no diff available. Modified: trunk/res/res_pjsip_exten_state.c URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_pjsip_exten_state.c?view=diff&rev=426781&r1=426780&r2=426781 ============================================================================== --- trunk/res/res_pjsip_exten_state.c (original) +++ trunk/res/res_pjsip_exten_state.c Thu Oct 30 16:14:01 2014 @@ -457,6 +457,10 @@ struct exten_state_subscription *exten_state_sub = get_exten_state_sub(sub); + if (!exten_state_sub) { + return; + } + ast_str_append(buf, 0, "SubscriptionType: extension_state\r\n" "Extension: %s\r\nExtensionStates: %s\r\n", exten_state_sub->exten, ast_extension_state2str( -- _____________________________________________________________________ -- 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
