res_pjsip_exten_state: PJSIPShowSubscriptionsInbound causes crash
authorKevin Harwell <kharwell@digium.com>
Thu, 30 Oct 2014 21:14:01 +0000 (21:14 +0000)
committerKevin Harwell <kharwell@digium.com>
Thu, 30 Oct 2014 21:14:01 +0000 (21:14 +0000)
commita537e314d1875dbc4af0a16ae6cbcde9fe18fa21
tree7c8467b6261ab94945004b4c8769eb04df1afaca
parentcd52456ea10d8716172dbacda5673ec8188c32ae
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

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@426781 65c4cc65-6c06-0410-ace0-fbb531ad65f3
res/res_pjsip_exten_state.c