fix seg from bad input

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@3909 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2007-01-04 22:08:41 +00:00
parent 8f4a636fa1
commit 085b897198
1 changed files with 5 additions and 0 deletions

View File

@ -1876,6 +1876,11 @@ static switch_status_t dl_login(char *arg, switch_core_session_t *session, switc
return SWITCH_STATUS_FALSE;
}
if (switch_strlen_zero(arg)) {
stream->write_function(stream, "USAGE: %s\n", login_api_interface.syntax);
return SWITCH_STATUS_SUCCESS;
}
myarg = strdup(arg);
argc = switch_separate_string(myarg, ';', argv, (sizeof(argv) / sizeof(argv[0])));