]> git.ipfire.org Git - thirdparty/asterisk.git/commit
res_pjsip: Fix crash with from_user containing invalid characters.
authorBenjamin Keith Ford <bford@digium.com>
Fri, 7 Jul 2017 16:19:13 +0000 (11:19 -0500)
committerBenjamin Keith Ford <bford@digium.com>
Mon, 10 Jul 2017 14:54:56 +0000 (09:54 -0500)
commit966f9b5b9f4ba9c47952d15c65fecfa0b0c44786
treefb7f9772ccd5b6ea4865c1ad73c7d431ad3a149b
parent42248e1569e4c6eb32b6fd6aa585c15bdae33702
res_pjsip: Fix crash with from_user containing invalid characters.

If the from_user field contains certain characters (like @, {, ^, etc.),
PJSIP will return a null value for the URI when attempting to parse it.
This causes a crash when trying to dial out through a trunk that contains
these invalid characters in its from_user field.

This change checks the configuration and ensures that an endpoint will
not be created if the from_user contains an invalid character. It also
adds a null check to the PJSIP URI parsing as a backup.

ASTERISK-27036 #close
Reported by: Maxim Vasilev

Change-Id: I0396fdb5080604e0bdf1277464d5c8a85db913d0
res/res_pjsip.c
res/res_pjsip/pjsip_configuration.c