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:46:05 +0000 (18:46 +0000)
commitf78f5278ffbf5eb1321ed78bf5996bbab3061cbd
tree2a2a2ac5530ede17cca4509f64194de29e4dc6fa
parent36c1513148d85af188e7e740fb1d6524c17fc3bf
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