[asterisk-commits] kmoore: branch 12 r398206 - /branches/12/res/res_pjsip_dtmf_info.c
SVN commits to the Asterisk project
asterisk-commits at lists.digium.com
Tue Sep 3 13:08:22 CDT 2013
Author: kmoore
Date: Tue Sep 3 13:08:20 2013
New Revision: 398206
URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=398206
Log:
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.
Modified:
branches/12/res/res_pjsip_dtmf_info.c
Modified: branches/12/res/res_pjsip_dtmf_info.c
URL: http://svnview.digium.com/svn/asterisk/branches/12/res/res_pjsip_dtmf_info.c?view=diff&rev=398206&r1=398205&r2=398206
==============================================================================
--- branches/12/res/res_pjsip_dtmf_info.c (original)
+++ branches/12/res/res_pjsip_dtmf_info.c Tue Sep 3 13:08:20 2013
@@ -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,
More information about the asterisk-commits
mailing list