[asterisk-commits] russell: trunk r62172 - in /trunk: ./ main/pbx.c

asterisk-commits at lists.digium.com asterisk-commits at lists.digium.com
Fri Apr 27 09:15:47 MST 2007


Author: russell
Date: Fri Apr 27 11:15:47 2007
New Revision: 62172

URL: http://svn.digium.com/view/asterisk?view=rev&rev=62172
Log:
Merged revisions 62171 via svnmerge from 
https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r62171 | russell | 2007-04-27 11:14:11 -0500 (Fri, 27 Apr 2007) | 6 lines

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:
    trunk/   (props changed)
    trunk/main/pbx.c

Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.

Modified: trunk/main/pbx.c
URL: http://svn.digium.com/view/asterisk/trunk/main/pbx.c?view=diff&rev=62172&r1=62171&r2=62172
==============================================================================
--- trunk/main/pbx.c (original)
+++ trunk/main/pbx.c Fri Apr 27 11:15:47 2007
@@ -1564,7 +1564,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 asterisk-commits mailing list