[asterisk-commits] russell: trunk r53094 - in /trunk: ./
funcs/func_strings.c
asterisk-commits at lists.digium.com
asterisk-commits at lists.digium.com
Thu Feb 1 14:27:23 MST 2007
Author: russell
Date: Thu Feb 1 15:27:22 2007
New Revision: 53094
URL: http://svn.digium.com/view/asterisk?view=rev&rev=53094
Log:
Merged revisions 53093 via svnmerge from
https://origsvn.digium.com/svn/asterisk/branches/1.4
........
r53093 | russell | 2007-02-01 15:24:52 -0600 (Thu, 01 Feb 2007) | 2 lines
Fix the FIELDQTY function to not crash. (reported by blitzrage and Corydon on IRC)
........
Modified:
trunk/ (props changed)
trunk/funcs/func_strings.c
Propchange: trunk/
------------------------------------------------------------------------------
Binary property 'branch-1.4-merged' - no diff available.
Modified: trunk/funcs/func_strings.c
URL: http://svn.digium.com/view/asterisk/trunk/funcs/func_strings.c?view=diff&rev=53094&r1=53093&r2=53094
==============================================================================
--- trunk/funcs/func_strings.c (original)
+++ trunk/funcs/func_strings.c Thu Feb 1 15:27:22 2007
@@ -48,7 +48,7 @@
static int function_fieldqty(struct ast_channel *chan, const char *cmd,
char *parse, char *buf, size_t len)
{
- char *varname, *varsubst, varval[8192] = "", *varval2 = varval;
+ char *varsubst, varval[8192] = "", *varval2 = varval;
int fieldcount = 0;
AST_DECLARE_APP_ARGS(args,
AST_APP_ARG(varname);
@@ -67,9 +67,9 @@
else
ast_copy_string(args.delim, "-", 2);
}
- varsubst = alloca(strlen(varname) + 4);
-
- sprintf(varsubst, "${%s}", varname);
+ varsubst = alloca(strlen(args.varname) + 4);
+
+ sprintf(varsubst, "${%s}", args.varname);
pbx_substitute_variables_helper(chan, varsubst, varval, sizeof(varval) - 1);
while (strsep(&varval2, args.delim))
fieldcount++;
More information about the asterisk-commits
mailing list