[Asterisk-cvs] asterisk/funcs func_strings.c,1.7,1.8

kpfleming kpfleming
Sun Sep 25 16:50:01 CDT 2005


Update of /usr/cvsroot/asterisk/funcs
In directory mongoose.digium.com:/tmp/cvs-serv14659/funcs

Modified Files:
	func_strings.c 
Log Message:
ensure result buffer is initialized (issue #5285)


Index: func_strings.c
===================================================================
RCS file: /usr/cvsroot/asterisk/funcs/func_strings.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- func_strings.c	14 Sep 2005 20:46:50 -0000	1.7
+++ func_strings.c	25 Sep 2005 20:47:00 -0000	1.8
@@ -186,11 +186,13 @@
 
 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;




More information about the svn-commits mailing list