]> git.ipfire.org Git - thirdparty/asterisk.git/commit
pjsip_message_ip_updater: Fix issue handling "tel" URIs
authorGeorge Joseph <gjoseph@digium.com>
Mon, 24 Jul 2017 15:48:14 +0000 (09:48 -0600)
committerJoshua Colp <jcolp@digium.com>
Wed, 30 Aug 2017 18:48:58 +0000 (18:48 +0000)
commit0e5b7743d9c038d49c0fb10382fdbac21b212040
treecdceb443e8d8e8d5223978cdb3d815f940d295c6
parent22f1f880c43a69190db29b73fede7073580bbc09
pjsip_message_ip_updater:  Fix issue handling "tel" URIs

sanitize_tdata was assuming all URIs were SIP URIs so when a non
SIP uri was in the From, To or Contact headers, the unconditional
cast of a non-pjsip_sip_uri structure to pjsip_sip_uri caused
a segfault when trying to access uri->other_param.

* Added PJSIP_URI_SCHEME_IS_SIP(uri) || PJSIP_URI_SCHEME_IS_SIPS(uri)
  checks before attempting to cast or use the returned uri.

ASTERISK-27152
Reported-by: Ross Beer
Change-Id: Id380df790e6622c8058a96035f8b8f4aa0b8551f
res/res_pjsip/pjsip_message_ip_updater.c