Issue #6383 - Crash on CLI originate with missing channel argument
authorOlle Johansson <oej@edvina.net>
Thu, 2 Feb 2006 14:04:29 +0000 (14:04 +0000)
committerOlle Johansson <oej@edvina.net>
Thu, 2 Feb 2006 14:04:29 +0000 (14:04 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@9065 65c4cc65-6c06-0410-ace0-fbb531ad65f3

res/res_clioriginate.c

index 56e92d9..be97d0f 100644 (file)
@@ -83,6 +83,10 @@ static int orig_app(const char *chan, const char *app, const char *appdata)
                return RESULT_FAILURE;
        }
        chantech = strsep(&chandata, "/");
+       if (!chandata) {
+               ast_log(LOG_ERROR, "No dial string.\n");
+               return RESULT_SHOWUSAGE;
+       }
 
        ast_pbx_outgoing_app(chantech, AST_FORMAT_SLINEAR, chandata, TIMEOUT * 1000, app, appdata, &reason, 1, NULL, NULL, NULL, NULL);