[asterisk-commits] kmoore: trunk r398207 - in /trunk: ./ res/res_pjsip_dtmf_info.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Sep 3 13:09:03 CDT 2013


Author: kmoore
Date: Tue Sep  3 13:09:02 2013
New Revision: 398207

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=398207
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.
........

Merged revisions 398206 from http://svn.asterisk.org/svn/asterisk/branches/12

Modified:
    trunk/   (props changed)
    trunk/res/res_pjsip_dtmf_info.c

Propchange: trunk/
------------------------------------------------------------------------------
--- branch-12-merged (original)
+++ branch-12-merged Tue Sep  3 13:09:02 2013
@@ -1,1 +1,1 @@
-/branches/12:1-398198
+/branches/12:1-398198,398206

Modified: trunk/res/res_pjsip_dtmf_info.c
URL: http://svnview.digium.com/svn/asterisk/trunk/res/res_pjsip_dtmf_info.c?view=diff&rev=398207&r1=398206&r2=398207
==============================================================================
--- trunk/res/res_pjsip_dtmf_info.c (original)
+++ trunk/res/res_pjsip_dtmf_info.c Tue Sep  3 13:09:02 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