[Asterisk-code-review] CHAOS: do not try to parse a null contact uri (asterisk[master])

Scott Griepentrog asteriskteam at digium.com
Tue Aug 18 17:59:30 CDT 2015


Scott Griepentrog has uploaded a new change for review.

  https://gerrit.asterisk.org/1117

Change subject: CHAOS: do not try to parse a null contact uri
......................................................................

CHAOS: do not try to parse a null contact uri

Before parsing the contact header uri, make
certain that it is not NULL.

ASTERISK-25323
Reported by: Scott Griepentrog

Change-Id: I1b58aa953889f53a066acfa8ec42bbe544c6c3f6
---
M res/res_pjsip_path.c
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/17/1117/1

diff --git a/res/res_pjsip_path.c b/res/res_pjsip_path.c
index 03cbe50..e82986d 100644
--- a/res/res_pjsip_path.c
+++ b/res/res_pjsip_path.c
@@ -187,7 +187,7 @@
 	}
 
 	contact_hdr = pjsip_msg_find_hdr(tdata->msg, PJSIP_H_CONTACT, NULL);
-	if (!contact_hdr) {
+	if (!contact_hdr || !contact_hdr->uri) {
 		return;
 	}
 

-- 
To view, visit https://gerrit.asterisk.org/1117
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1b58aa953889f53a066acfa8ec42bbe544c6c3f6
Gerrit-PatchSet: 1
Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-Owner: Scott Griepentrog <sgriepentrog at digium.com>



More information about the asterisk-code-review mailing list