diff options
Diffstat (limited to 'apps/app_agi.c')
-rwxr-xr-x | apps/app_agi.c | 2 |
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; } |