]> git.ipfire.org Git - thirdparty/asterisk.git/commit
pjsip: restrict function PJSIP_PARSE_URI to parse only SIP/SIPS URIs
authorAlexei Gradinari <alex2grad@gmail.com>
Mon, 25 Mar 2019 23:05:28 +0000 (19:05 -0400)
committerAlexei Gradinari <alex2grad@gmail.com>
Mon, 25 Mar 2019 23:17:02 +0000 (19:17 -0400)
commite51bd0726b0df0114f6ea916ab28abe67dd7f4ad
treec0960ced6700fbdf4c7d601186b96fa8404cf266
parentc7d29cdcf269962a6b887237149ef455b30af50c
pjsip: restrict function PJSIP_PARSE_URI to parse only SIP/SIPS URIs

The next usage of PJSIP_PARSE_URI will crash asterisk
${PJSIP_PARSE_URI(tel:+1234567890,host)}
or
${PJSIP_PARSE_URI(192.168.1.1:5060,host)}

The function pjsip_parse_uri successfully parses then, but returns
struct pjsip_other_uri *.

This patch restricts parsing only SIP/SIPS URIs.

Change-Id: I16f255c2b86a80a67e9f9604b94b129a381dd25e
channels/pjsip/dialplan_functions.c