fix seg in alias del

This commit is contained in:
Anthony Minessale 2014-04-05 21:09:23 +05:00
parent fb7fa3d66a
commit 77056e3c81
1 changed files with 1 additions and 1 deletions

View File

@ -1920,7 +1920,7 @@ SWITCH_DECLARE(switch_status_t) switch_console_set_alias(const char *string)
switch_cache_db_handle_t *db = NULL;
char *sql = NULL;
if (!strcmp(argv[1], argv[2])) {
if (argc > 2 && !strcmp(argv[1], argv[2])) {
switch_log_printf(SWITCH_CHANNEL_LOG, SWITCH_LOG_ERROR, "Alias and command cannot be the same, this will cause loop!\n");
return SWITCH_STATUS_FALSE;
}