mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-07-23 12:42:02 +00:00
mod_commands: check for zstr(cmd) in escape_function
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16029 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -3866,8 +3866,15 @@ SWITCH_STANDARD_API(hupall_api_function)
|
||||
|
||||
SWITCH_STANDARD_API(escape_function)
|
||||
{
|
||||
int len = strlen(cmd)*2;
|
||||
char *mycmd = malloc(strlen(cmd)*2);
|
||||
int len;
|
||||
char *mycmd;
|
||||
|
||||
if (zstr(cmd)) {
|
||||
return SWITCH_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
len = strlen(cmd)*2;
|
||||
mycmd = malloc(len);
|
||||
|
||||
stream->write_function(stream, "%s", switch_escape_string(cmd, mycmd, len));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user