]> 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:49 +0000 (21:09 +0500)
src/switch_console.c

index d43f7702e1358d6bcca5cea5c55c469b20a853a1..66c01583e740494c84bf1e32e88d7d07c0a9e1ac 100644 (file)
@@ -1921,7 +1921,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;
                        }