properly initialize a malloc'ed buffer

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Luigi Rizzo
2006-12-12 10:36:15 +00:00
parent 1b45dc4eee
commit 77e986e0d0

View File

@@ -2603,6 +2603,7 @@ static char *xml_translate(char *in, struct ast_variable *vars, enum output_form
if (!out)
return NULL;
tmp = out;
*tmp = '\0';
/* we want to stop when we find an empty line */
while (in && *in) {
val = strsep(&in, "\r\n"); /* mark start and end of line */