[Asterisk-code-review] res pjsip pubsub: Check for Content-Type header in rx notif... (asterisk[13])

George Joseph asteriskteam at digium.com
Tue Sep 19 10:42:03 CDT 2017


George Joseph has uploaded this change for review. ( https://gerrit.asterisk.org/6538


Change subject: res_pjsip_pubsub:  Check for Content-Type header in rx_notify_request
......................................................................

res_pjsip_pubsub:  Check for Content-Type header in rx_notify_request

pubsub_on_rx_notify_request wasn't checking for a null
Content-Type header before checking that it was
application/simple-message-summary.

ASTERISK-27279
Reported by: Ross Beer

Change-Id: Iec2a6c4d2e74af37ff779ecc9fd35644c5c4ea52
---
M res/res_pjsip_pubsub.c
1 file changed, 2 insertions(+), 1 deletion(-)



  git pull ssh://gerrit.asterisk.org:29418/asterisk refs/changes/38/6538/1

diff --git a/res/res_pjsip_pubsub.c b/res/res_pjsip_pubsub.c
index ac074c7..e0db13b 100644
--- a/res/res_pjsip_pubsub.c
+++ b/res/res_pjsip_pubsub.c
@@ -3586,7 +3586,8 @@
 
 static pj_bool_t pubsub_on_rx_notify_request(pjsip_rx_data *rdata)
 {
-	if (pj_stricmp2(&rdata->msg_info.msg->body->content_type.type, "application") == 0 &&
+	if (&rdata->msg_info.msg->body->content_type &&
+		pj_stricmp2(&rdata->msg_info.msg->body->content_type.type, "application") == 0 &&
 		pj_stricmp2(&rdata->msg_info.msg->body->content_type.subtype, "simple-message-summary") == 0) {
 		return pubsub_on_rx_mwi_notify_request(rdata);
 	}

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

Gerrit-Project: asterisk
Gerrit-Branch: 13
Gerrit-MessageType: newchange
Gerrit-Change-Id: Iec2a6c4d2e74af37ff779ecc9fd35644c5c4ea52
Gerrit-Change-Number: 6538
Gerrit-PatchSet: 1
Gerrit-Owner: George Joseph <gjoseph at digium.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20170919/eb006465/attachment.html>


More information about the asterisk-code-review mailing list