]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Use ast_strlen_zero to avoid a crash when a Dial() string isn't passed to ParkAndAnnounce
authorSean Bright <sean@malleable.com>
Tue, 9 Mar 2010 19:29:39 +0000 (19:29 +0000)
committerSean Bright <sean@malleable.com>
Tue, 9 Mar 2010 19:29:39 +0000 (19:29 +0000)
(closes issue #16731)
Reported by: sebele67
Patches:
      issue16731_20100129.diff uploaded by seanbright (license 71)
Tested by: sebele67

git-svn-id: https://origsvn.digium.com/svn/asterisk/branches/1.4@251410 65c4cc65-6c06-0410-ace0-fbb531ad65f3

apps/app_parkandannounce.c

index 9e9f1604d3ecfddfa9c6ae3e9acfae7a93bd8793..9b1a388a7aa4ed01f153e58912d5dfa224b30898 100644 (file)
@@ -112,7 +112,7 @@ static int parkandannounce_exec(struct ast_channel *chan, void *data)
                timeout *= 1000;
        }
        dial = strsep(&s, "|");
-       if(!dial) {
+       if (ast_strlen_zero(dial)) {
                ast_log(LOG_WARNING, "PARK: A dial resource must be specified i.e: Console/dsp or Zap/g1/5551212\n");
                ast_module_user_remove(u);
                return -1;