From: Tilghman Lesher Date: Wed, 14 Mar 2007 01:47:08 +0000 (+0000) Subject: Issue 9162 - pbx_substitute_variables_helper assumes the buffer is initialized X-Git-Tag: 1.4.2~26 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2fd66654aceb0df6376cb3615a63c5a3ffd95328;p=thirdparty%2Fasterisk.git Issue 9162 - pbx_substitute_variables_helper assumes the buffer is initialized to all zeroes. This fixes a case where it wasn't. git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@58880 65c4cc65-6c06-0410-ace0-fbb531ad65f3 --- diff --git a/funcs/func_strings.c b/funcs/func_strings.c index 4787e0dee1..45d50b48af 100644 --- a/funcs/func_strings.c +++ b/funcs/func_strings.c @@ -506,7 +506,7 @@ static struct ast_custom_function strptime_function = { static int function_eval(struct ast_channel *chan, char *cmd, char *data, char *buf, size_t len) { - buf[0] = '\0'; + memset(buf, 0, len); if (ast_strlen_zero(data)) { ast_log(LOG_WARNING, "EVAL requires an argument: EVAL()\n");