]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res/res_pjsip_session: Check for presence of an active negotiator 87/3187/1
authorMatt Jordan <mjordan@digium.com>
Sat, 25 Jun 2016 00:55:09 +0000 (19:55 -0500)
committerMatt Jordan <mjordan@digium.com>
Wed, 13 Jul 2016 14:12:04 +0000 (09:12 -0500)
commit0d487b53b13e9debb51ad8fe84b3767de5d25d75
treedafe97e20588a1bead3f93480d290eb1a141827a
parent73d8cb587d6515b707c9cafe334e18fbd7c24905
res/res_pjsip_session: Check for presence of an active negotiator

It is possible in a hypothetical situation for a session refresh to be
invoked on a PJSIP when the negotiatior on the INVITE session has not
yet been established. While this shouldn't occur with existing uses of
ast_sip_session_refresh, the crashes that occur due to improperly
calling PJSIP functions that expect a non-NULL negotiatior are
avoidable. PJSIP will create the negotiator in pjsip_inv_reinvite; this
means that simply checking for the presence of the negotiator before
passing it to other PJSIP functions that use it is allowable. As such,
this patch adds checks for the presence of the negotiator before calling
PJSIP functions that assume it is non-NULL.

Change-Id: I1028323e7e01b0a531865e5412a71b6f6ec4276d
res/res_pjsip_session.c