[asterisk-commits] jrose: trunk r342148 - /trunk/main/features.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Mon Oct 24 17:09:15 CDT 2011


Author: jrose
Date: Mon Oct 24 17:09:11 2011
New Revision: 342148

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=342148
Log:
Fixes a segfault caused by referencing null frames introduced in r338623


Modified:
    trunk/main/features.c

Modified: trunk/main/features.c
URL: http://svnview.digium.com/svn/asterisk/trunk/main/features.c?view=diff&rev=342148&r1=342147&r2=342148
==============================================================================
--- trunk/main/features.c (original)
+++ trunk/main/features.c Mon Oct 24 17:09:11 2011
@@ -4053,11 +4053,11 @@
 					   digits to come in for features. */
 					ast_debug(1, "Timed out for feature!\n");
 					if (!ast_strlen_zero(peer_featurecode)) {
-						ast_dtmf_stream(chan, peer, peer_featurecode, 0, f->len);
+						ast_dtmf_stream(chan, peer, peer_featurecode, 0, f ? f->len : 0);
 						memset(peer_featurecode, 0, sizeof(peer_featurecode));
 					}
 					if (!ast_strlen_zero(chan_featurecode)) {
-						ast_dtmf_stream(peer, chan, chan_featurecode, 0, f->len);
+						ast_dtmf_stream(peer, chan, chan_featurecode, 0, f ? f->len : 0);
 						memset(chan_featurecode, 0, sizeof(chan_featurecode));
 					}
 					if (f)




More information about the asterisk-commits mailing list