summaryrefslogtreecommitdiff
path: root/res/res_pjsip.c
diff options
context:
space:
mode:
authorKinsey Moore <kmoore@digium.com>2014-08-13 16:56:14 +0000
committerKinsey Moore <kmoore@digium.com>2014-08-13 16:56:14 +0000
commit6aa510b41f6ed70ed549ef75addf3097890ba155 (patch)
treed4dafb51fec1ffac82c0de6e54b82e16e7e78c8b /res/res_pjsip.c
parentd4695774e7ef3b4699b8283f175d161cd19e3d25 (diff)
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. ........ Merged revisions 420949 from http://svn.asterisk.org/svn/asterisk/branches/12 ........ Merged revisions 420950 from http://svn.asterisk.org/svn/asterisk/branches/13 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@420953 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_pjsip.c')
-rw-r--r--res/res_pjsip.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_pjsip.c b/res/res_pjsip.c
index 421da8c9d..68193f0bb 100644
--- a/res/res_pjsip.c
+++ b/res/res_pjsip.c
@@ -2285,7 +2285,7 @@ static int create_out_of_dialog_request(const pjsip_method *method, struct ast_s
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;
}