[Asterisk-code-review] res pjsip mwi: Fix null pointer crash (asterisk[master])

Joshua Elson asteriskteam at digium.com
Thu Feb 1 13:07:38 CST 2018


Joshua Elson has uploaded this change for review. ( https://gerrit.asterisk.org/8135


Change subject: res_pjsip_mwi: Fix null pointer crash
......................................................................

res_pjsip_mwi: Fix null pointer crash

ASTERISK-27652 #close

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



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/35/8135/1

diff --git a/res/res_pjsip_mwi.c b/res/res_pjsip_mwi.c
index 90fdc09..3e94c5d 100644
--- a/res/res_pjsip_mwi.c
+++ b/res/res_pjsip_mwi.c
@@ -650,7 +650,7 @@
 		.body_type = AST_SIP_MESSAGE_ACCUMULATOR,
 		.body_data = &counter,
 	};
-	const char *resource = ast_sip_subscription_get_resource_name(sub->sip_sub);
+	const char *resource = sub->is_solicited ? ast_sip_subscription_get_resource_name(sub->sip_sub) : NULL; 
 
 	ao2_callback(sub->stasis_subs, OBJ_NODATA, get_message_count, &counter);
 

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

Gerrit-Project: asterisk
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I78a0d38bfd8d0d82830f3d53da04872d6b67284d
Gerrit-Change-Number: 8135
Gerrit-PatchSet: 1
Gerrit-Owner: Joshua Elson <joshelson at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20180201/a634d8fb/attachment.html>


More information about the asterisk-code-review mailing list