From 77056e3c813752563f5c157759b518ace45b2239 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Sat, 5 Apr 2014 21:09:23 +0500 Subject: [PATCH] fix seg in alias del --- src/switch_console.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/switch_console.c b/src/switch_console.c index 1ac4c05117..62252a91ff 100644 --- a/src/switch_console.c +++ b/src/switch_console.c @@ -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; }