summaryrefslogtreecommitdiff
path: root/apps/app_agi.c
diff options
context:
space:
mode:
authorMatteo Brancaleoni <mbrancaleoni@espia.it>2003-02-18 18:15:30 +0000
committerMatteo Brancaleoni <mbrancaleoni@espia.it>2003-02-18 18:15:30 +0000
commitcf3b725fe906080f6abf3f2ff16eb565660062aa (patch)
tree0de34ae75587bde85880b54639d681ab4e4b986a /apps/app_agi.c
parent9ea88c182549a8b4961b3fdd7dd63bd364671d52 (diff)
mar feb 18 19:15:15 CET 2003
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@618 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'apps/app_agi.c')
-rwxr-xr-xapps/app_agi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/apps/app_agi.c b/apps/app_agi.c
index e7bccedf6..a616e814d 100755
--- a/apps/app_agi.c
+++ b/apps/app_agi.c
@@ -958,6 +958,8 @@ static agi_command *find_command(char *cmds[], int exact)
then this is not a match */
if (!commands[x].cmda[y] && !exact)
break;
+ /* don't segfault if the next part of a command doesn't exist */
+ if (!commands[x].cmda[y]) return NULL;
if (strcasecmp(commands[x].cmda[y], cmds[y]))
match = 0;
}