]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Issue 9162 - pbx_substitute_variables_helper assumes the buffer is initialized
authorTilghman Lesher <tilghman@meg.abyt.es>
Wed, 14 Mar 2007 01:47:08 +0000 (01:47 +0000)
committerTilghman Lesher <tilghman@meg.abyt.es>
Wed, 14 Mar 2007 01:47:08 +0000 (01:47 +0000)
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

funcs/func_strings.c

index 4787e0dee193155bb307381a2adad0e5f210e6dc..45d50b48afc9178d66a57fbd1ff565c554928a12 100644 (file)
@@ -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(<string>)\n");