Leave room for switch_escape_string to add a terminating null

Thanks-to: Nathan Neulinger <nneul@mst.edu>

FS-5448 --resolve
This commit is contained in:
Travis Cross
2013-05-25 23:28:55 +00:00
parent 2870bb9200
commit 103d97e208
2 changed files with 2 additions and 2 deletions
@@ -5521,7 +5521,7 @@ SWITCH_STANDARD_API(escape_function)
return SWITCH_STATUS_SUCCESS;
}
len = (int)strlen(cmd) * 2;
len = (int)strlen(cmd) * 2 + 1;
mycmd = malloc(len);
stream->write_function(stream, "%s", switch_escape_string(cmd, mycmd, len));