aboutsummaryrefslogtreecommitdiffstats
path: root/funcs
diff options
context:
space:
mode:
authorkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-09-25 20:47:00 +0000
committerkpfleming <kpfleming@f38db490-d61c-443f-a65b-d21fe96a405b>2005-09-25 20:47:00 +0000
commit22c8583cbfeb069baed25cc2ffbd17ad73da2361 (patch)
tree4031321278f8bd1a25fe891f7eed62fa26e39a4e /funcs
parenta3800e5678a918b8cf76cf634e8a9648ac2b7724 (diff)
ensure result buffer is initialized (issue #5285)
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@6652 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'funcs')
-rwxr-xr-xfuncs/func_strings.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/funcs/func_strings.c b/funcs/func_strings.c
index 77933b6db..303ca77d7 100755
--- a/funcs/func_strings.c
+++ b/funcs/func_strings.c
@@ -186,11 +186,13 @@ struct ast_custom_function strftime_function = {
static char *function_eval(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len)
{
+ memset(buf, 0, len);
+
if (!data || ast_strlen_zero(data)) {
- ast_log(LOG_WARNING, "EVAL requires an argument: EVAL(<variable>)\n");
+ ast_log(LOG_WARNING, "EVAL requires an argument: EVAL(<string>)\n");
return buf;
}
-
+
pbx_substitute_variables_helper(chan, data, buf, len - 1);
return buf;