[asterisk-commits] file: trunk r396993 - /trunk/res/res_pjsip_dtmf_info.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Tue Aug 20 06:35:00 CDT 2013


Author: file
Date: Tue Aug 20 06:33:43 2013
New Revision: 396993

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=396993
Log:
Remove assumption in res_pjsip_dtmf_info that all INFO messages will contain a body.

(closes issue ASTERISK-22320)
Reported by: Matt Jordan

Modified:
    trunk/res/res_pjsip_dtmf_info.c

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=396993&r1=396992&r2=396993
==============================================================================
--- trunk/res/res_pjsip_dtmf_info.c (original)
+++ trunk/res/res_pjsip_dtmf_info.c Tue Aug 20 06:33:43 2013
@@ -39,14 +39,14 @@
 
 	pjsip_tx_data *tdata;
 
-	char buf[body->len];
+	char buf[body ? body->len : 0];
 	char *cur = buf;
 	char *line;
 
 	char event = '\0';
 	unsigned int duration = 0;
 
-	if (!ast_sip_is_content_type(&body->content_type, "application", "dtmf-relay")) {
+	if (!body || !ast_sip_is_content_type(&body->content_type, "application", "dtmf-relay")) {
 		return 0;
 	}
 




More information about the asterisk-commits mailing list