From: Anthony Minessale Date: Sat, 5 Apr 2014 16:09:23 +0000 (+0500) Subject: fix seg in alias del X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d621262db1fd97538873ffa7fddcbcf96e72431f;p=thirdparty%2Ffreeswitch.git fix seg in alias del --- diff --git a/src/switch_console.c b/src/switch_console.c index d43f7702e1..66c01583e7 100644 --- a/src/switch_console.c +++ b/src/switch_console.c @@ -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; }