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

Joshua Elson asteriskteam at digium.com
Thu Feb 1 13:05:46 CST 2018


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


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/33/8133/1

diff --git a/res/res_pjsip_mwi.c b/res/res_pjsip_mwi.c
index 5423038..964dbfb 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/8133
To unsubscribe, visit https://gerrit.asterisk.org/settings

Gerrit-Project: asterisk
Gerrit-Branch: 14
Gerrit-MessageType: newchange
Gerrit-Change-Id: I78a0d38bfd8d0d82830f3d53da04872d6b67284d
Gerrit-Change-Number: 8133
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/25c23fe3/attachment.html>


More information about the asterisk-code-review mailing list