fix segfault on incorrect usage of originate api command (jira MODAPP-2)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4378 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
9f4ff8814b
commit
875f87ab54
|
@ -522,10 +522,10 @@ static switch_status_t originate_function(char *cmd, switch_core_session_t *ises
|
|||
assert(caller_channel != NULL);
|
||||
switch_channel_clear_state_handler(caller_channel, NULL);
|
||||
|
||||
if (*exten == '&') {
|
||||
if (*exten == '&' && *(exten + 1)) {
|
||||
switch_caller_extension_t *extension = NULL;
|
||||
char *app_name = switch_core_session_strdup(caller_session, (exten + 1));
|
||||
char *arg, *e;
|
||||
char *arg = NULL, *e;
|
||||
|
||||
if ((e = strchr(app_name, ')'))) {
|
||||
*e = '\0';
|
||||
|
|
Loading…
Reference in New Issue