]> git.ipfire.org Git - thirdparty/asterisk.git/commit
pjsip: avoid edge case potential crash in answer()
authorScott Griepentrog <sgriepentrog@digium.com>
Wed, 26 Feb 2014 19:00:07 +0000 (19:00 +0000)
committerScott Griepentrog <sgriepentrog@digium.com>
Wed, 26 Feb 2014 19:00:07 +0000 (19:00 +0000)
commit33d60bed468ead3fb325ac196dfb89485eda0dd5
tree48c85a144af1c032445d3191768a3813a0e6ed7f
parentccfa79d2baf33717790f32f2ef5dcab0a4ac3f50
pjsip: avoid edge case potential crash in answer()

When accidentally compiling against a wrong version of
pjsip headers with a different pjsip_inv_session size,
the invite_tsx structure could be null in the answer()
function.  This led to a crash because it attempted to
send the session response with an uninitialized packet
pointer.  This patch presets packet to null and adds a
diagnostic log message to explain why the call fails.

Review: https://reviewboard.asterisk.org/r/3267/

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/12@408970 65c4cc65-6c06-0410-ace0-fbb531ad65f3
channels/chan_pjsip.c