[Asterisk-code-review] chan pjsip: Fix crash during off-nominal when no endpoint sp... (asterisk[13])

Matt Jordan asteriskteam at digium.com
Mon May 18 07:33:55 CDT 2015


Matt Jordan has submitted this change and it was merged.

Change subject: chan_pjsip: Fix crash during off-nominal when no endpoint specified.
......................................................................


chan_pjsip: Fix crash during off-nominal when no endpoint specified.

Add missing return -1 when no endpoint name is specified.

ASTERISK-25086 #close
Reported by: snuffy

Change-Id: I9de76c2935a1f4e3f0cffe97a670106f5605e89e
---
M channels/chan_pjsip.c
1 file changed, 1 insertion(+), 0 deletions(-)

Approvals:
  Matt Jordan: Looks good to me, approved; Verified
  Joshua Colp: Looks good to me, but someone else must approve



diff --git a/channels/chan_pjsip.c b/channels/chan_pjsip.c
index c111cf1..b7d7065 100644
--- a/channels/chan_pjsip.c
+++ b/channels/chan_pjsip.c
@@ -1815,6 +1815,7 @@
 	if (ast_strlen_zero(endpoint_name)) {
 		ast_log(LOG_ERROR, "Unable to create PJSIP channel with empty endpoint name\n");
 		req_data->cause = AST_CAUSE_CHANNEL_UNACCEPTABLE;
+		return -1;
 	} else if (!(endpoint = ast_sorcery_retrieve_by_id(ast_sip_get_sorcery(), "endpoint", endpoint_name))) {
 		ast_log(LOG_ERROR, "Unable to create PJSIP channel - endpoint '%s' was not found\n", endpoint_name);
 		req_data->cause = AST_CAUSE_NO_ROUTE_DESTINATION;

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I9de76c2935a1f4e3f0cffe97a670106f5605e89e
Gerrit-PatchSet: 8
Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-Owner: snuffy <snuffy22 at gmail.com>
Gerrit-Reviewer: Ashley Sanders <asanders at digium.com>
Gerrit-Reviewer: Corey Farrell <git at cfware.com>
Gerrit-Reviewer: Joshua Colp <jcolp at digium.com>
Gerrit-Reviewer: Matt Jordan <mjordan at digium.com>
Gerrit-Reviewer: snuffy <snuffy22 at gmail.com>



More information about the asterisk-code-review mailing list