Skip to content
Snippets Groups Projects
Commit e5542ab1 authored by Kinsey Moore's avatar Kinsey Moore
Browse files

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
parent 32d32543
No related branches found
No related tags found
No related merge requests found
......@@ -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,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment