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;
                }


-- 
_____________________________________________________________________
-- Bandwidth and Colocation Provided by http://www.api-digital.com --

svn-commits mailing list
To UNSUBSCRIBE or update options visit:
   http://lists.digium.com/mailman/listinfo/svn-commits

Reply via email to