]> git.ipfire.org Git - thirdparty/asterisk.git/commit
chan_sip: when getting sip pvt return failure if not found
authorScott Griepentrog <scott@griepentrog.com>
Wed, 6 Sep 2017 21:05:32 +0000 (17:05 -0400)
committerScott Griepentrog <scott@griepentrog.com>
Wed, 6 Sep 2017 21:14:15 +0000 (16:14 -0500)
commit74e4f7ecf1c88d691d487eb79acb8b8264804b52
tree5eb950d7a0eb252817b3cbb8e195fcffd1a98f98
parent47e4cbc3952b08c24e6a22c943442b2382c13861
chan_sip: when getting sip pvt return failure if not found

In handle_request_invite, when processing a pickup, a call
is made to get_sip_pvt_from_replaces to locate the pvt for
the subscription. The pvt is assumed to be valid when zero
is returned indicating no error, and is dereferenced which
can cause a crash if it was not found.

This change checks the not found case and returns -1 which
allows the calling code to fail appropriately.

ASTERISK-27217 #close
Reported-by: Bryan Walters
Change-Id: I6bee92b8b8b85fcac3fd66f8c00ab18bc1765612
channels/chan_sip.c