]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix seg in alias del
authorAnthony Minessale <anthm@freeswitch.org>
Sat, 5 Apr 2014 16:09:23 +0000 (21:09 +0500)
committerAnthony Minessale <anthm@freeswitch.org>
Sat, 5 Apr 2014 16:09:28 +0000 (21:09 +0500)
src/switch_console.c

index 1ac4c0511788b545d2df4c304b6028240b0bd385..62252a91ff35945bcb9da274a5ccb4f78e5e25b9 100644 (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;
                        }