[asterisk-commits] kharwell: branch 13 r426780 - in /branches/13: ./ res/res_pjsip_exten_state.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu Oct 30 16:13:32 CDT 2014


Author: kharwell
Date: Thu Oct 30 16:13:30 2014
New Revision: 426780

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=426780
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

Modified:
    branches/13/   (props changed)
    branches/13/res/res_pjsip_exten_state.c

Propchange: branches/13/
------------------------------------------------------------------------------
Binary property 'branch-12-merged' - no diff available.

Modified: branches/13/res/res_pjsip_exten_state.c
URL: http://svnview.digium.com/svn/asterisk/branches/13/res/res_pjsip_exten_state.c?view=diff&rev=426780&r1=426779&r2=426780
==============================================================================
--- branches/13/res/res_pjsip_exten_state.c (original)
+++ branches/13/res/res_pjsip_exten_state.c Thu Oct 30 16:13:30 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(




More information about the asterisk-commits mailing list