mirror of
https://github.com/asterisk/asterisk.git
synced 2025-11-01 03:04:19 +00:00
Fix an off by one error that causes a crash.
Thanks to Raymond Burke for pointing it out. git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@262897 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
@@ -1196,7 +1196,7 @@ static char *cli_console_active(struct ast_cli_entry *e, int cmd, struct ast_cli
|
||||
return CLI_SUCCESS;
|
||||
}
|
||||
|
||||
if (!(pvt = find_pvt(a->argv[e->args]))) {
|
||||
if (!(pvt = find_pvt(a->argv[e->args - 1]))) {
|
||||
ast_cli(a->fd, "Could not find a device called '%s'.\n", a->argv[e->args]);
|
||||
return CLI_FAILURE;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user