From 98429d37b2e66daf9d813e39cf78d1936c2521c9 Mon Sep 17 00:00:00 2001 From: Steve Murphy Date: Mon, 12 Nov 2007 18:44:36 +0000 Subject: Based on a note in asterisk-dev by Brian Capouch, I determined I too agressive in not initializing arrays passed to pbx_substitute_variables_xxxx; I reviewed the code (again) and hopefully found every possible spot where substitute_variables is called conditionally, and made sure the char array involved was set to a null string. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@89186 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- main/pbx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'main/pbx.c') diff --git a/main/pbx.c b/main/pbx.c index 483bb762e..4d4fcd3b0 100644 --- a/main/pbx.c +++ b/main/pbx.c @@ -1652,6 +1652,7 @@ struct ast_exten *pbx_find_extension(struct ast_channel *chan, continue; } /* Substitute variables now */ + if (sw->eval) pbx_substitute_variables_helper(chan, sw->data, sw->tmpdata, SWITCH_DATA_LENGTH - 1); @@ -6886,7 +6887,7 @@ int pbx_builtin_importvar(struct ast_channel *chan, void *data) ast_log(LOG_WARNING, "Ignoring, since there is no variable to set\n"); return 0; } - + tmp[0] = 0; if (!deprecation_warning) { ast_log(LOG_WARNING, "ImportVar is deprecated. Please use Set(varname=${IMPORT(channel,variable)}) instead.\n"); deprecation_warning = 1; -- cgit v1.2.3