[asterisk-commits] kmoore: branch 12 r420949 - /branches/12/res/res_pjsip.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Wed Aug 13 11:47:13 CDT 2014


Author: kmoore
Date: Wed Aug 13 11:47:10 2014
New Revision: 420949

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=420949
Log:
PJSIP: Prevent crash no-URI contacts

This prevents a crash from occurring when a contact with no URI is used
for the creation of an outbound out-of-dialog request with no
associated endpoint.

Modified:
    branches/12/res/res_pjsip.c

Modified: branches/12/res/res_pjsip.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/res_pjsip.c?view=diff&rev=420949&r1=420948&r2=420949
==============================================================================
--- branches/12/res/res_pjsip.c (original)
+++ branches/12/res/res_pjsip.c Wed Aug 13 11:47:10 2014
@@ -1740,7 +1740,7 @@
 	pjsip_tpselector selector = { .type = PJSIP_TPSELECTOR_NONE, };
 
 	if (ast_strlen_zero(uri)) {
-		if (!endpoint && !contact) {
+		if (!endpoint && (!contact || ast_strlen_zero(contact->uri))) {
 			ast_log(LOG_ERROR, "An endpoint and/or uri must be specified\n");
 			return -1;
 		}




More information about the asterisk-commits mailing list