]> git.ipfire.org Git - thirdparty/asterisk.git/commit
chan_sip: Fix crash when accessing RURI before initiating outgoing call
authorNaveen Albert <asterisk@phreaknet.org>
Wed, 24 Nov 2021 02:21:23 +0000 (02:21 +0000)
committerGeorge Joseph <gjoseph@digium.com>
Mon, 13 Dec 2021 19:39:26 +0000 (13:39 -0600)
commit97f400100cbc0cd3217c0fdc88de59be24eba8f3
tree4a40ce59ffe81a51d8ae7bce29a91f2a9eb622fd
parentb64e894650fc55b62b9ee07fd7c21034fde4a306
chan_sip: Fix crash when accessing RURI before initiating outgoing call

Attempting to access ${CHANNEL(ruri)} in a pre-dial handler before
initiating an outgoing call will cause Asterisk to crash. This is
because a null field is accessed, resulting in an offset from null and
subsequent memory access violation.

Since RURI is not guaranteed to exist, we now check if the base
pointer is non-null before calculating an offset.

ASTERISK-29772

Change-Id: Icd3b02f07256bbe6615854af5717074087b95a83
channels/sip/dialplan_functions.c