[asterisk-commits] kharwell: trunk r426781 - in /trunk: ./ res/res_pjsip_exten_state.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Thu Oct 30 16:14:03 CDT 2014
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(
More information about the asterisk-commits
mailing list