summaryrefslogtreecommitdiff
path: root/res/res_pjsip_dtmf_info.c
diff options
context:
space:
mode:
authorKinsey Moore <kmoore@digium.com>2013-09-03 18:09:02 +0000
committerKinsey Moore <kmoore@digium.com>2013-09-03 18:09:02 +0000
commite5542ab1e7d8780b541e1c3803dc8d4e4983d8ea (patch)
tree4ec7724f655f8d0fd1c76ea3ff7c20a9eed56631 /res/res_pjsip_dtmf_info.c
parent32d325439f261638fae2b3a31e848b2b2002fca3 (diff)
Prevent a crash in res_pjsip_dtmf_info.c
This change makes sure that a content type header exists before checking the contents of the header against known SIP INFO DTMF content types. ........ Merged revisions 398206 from http://svn.asterisk.org/svn/asterisk/branches/12 git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@398207 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'res/res_pjsip_dtmf_info.c')
-rw-r--r--res/res_pjsip_dtmf_info.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/res/res_pjsip_dtmf_info.c b/res/res_pjsip_dtmf_info.c
index 72f93dc46..6a1ce20ff 100644
--- a/res/res_pjsip_dtmf_info.c
+++ b/res/res_pjsip_dtmf_info.c
@@ -34,8 +34,9 @@
static int is_media_type(pjsip_rx_data *rdata, char *subtype)
{
- return !pj_strcmp2(&rdata->msg_info.ctype->media.type, "application") &&
- !pj_strcmp2(&rdata->msg_info.ctype->media.subtype, subtype);
+ return rdata->msg_info.ctype
+ && !pj_strcmp2(&rdata->msg_info.ctype->media.type, "application")
+ && !pj_strcmp2(&rdata->msg_info.ctype->media.subtype, subtype);
}
static void send_response(struct ast_sip_session *session,