properly initialize a malloc'ed buffer

git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@48410 65c4cc65-6c06-0410-ace0-fbb531ad65f3
1.6.0
Luigi Rizzo 20 years ago
parent 1b45dc4eee
commit 77e986e0d0

@ -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 */

Loading…
Cancel
Save