[svn-commits] russell: branch 1.4 r62171 - /branches/1.4/main/pbx.c

svn-commits at lists.digium.com svn-commits at lists.digium.com
Fri Apr 27 09:14:11 MST 2007


Author: russell
Date: Fri Apr 27 11:14:11 2007
New Revision: 62171

URL: http://svn.digium.com/view/asterisk?view=rev&rev=62171
Log:
If no variables were passed into pbx_substitute_variables_helper_full(), then
don't even bother creating a temporary bogus channel, since that is only for
allowing certain functions to operate on the variables as if they were on a 
channel.  Most importantly, this fixes a crash.
(issue #9613, reported by callguy, fixed by me)

Modified:
    branches/1.4/main/pbx.c

Modified: branches/1.4/main/pbx.c
URL: http://svn.digium.com/view/asterisk/branches/1.4/main/pbx.c?view=diff&rev=62171&r1=62170&r2=62171
==============================================================================
--- branches/1.4/main/pbx.c (original)
+++ branches/1.4/main/pbx.c Fri Apr 27 11:14:11 2007
@@ -1642,7 +1642,7 @@
 			parse_variable_name(vars, &offset, &offset2, &isfunction);
 			if (isfunction) {
 				/* Evaluate function */
-				if (c)
+				if (c || !headp)
 					cp4 = ast_func_read(c, vars, workspace, VAR_BUF_SIZE) ? NULL : workspace;
 				else {
 					struct varshead old;



More information about the svn-commits mailing list