]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
Merged revisions 262897 via svnmerge from
authorRussell Bryant <russell@russellbryant.com>
Thu, 13 May 2010 15:36:41 +0000 (15:36 +0000)
committerRussell Bryant <russell@russellbryant.com>
Thu, 13 May 2010 15:36:41 +0000 (15:36 +0000)
https://origsvn.digium.com/svn/asterisk/trunk

........
  r262897 | russell | 2010-05-13 10:36:12 -0500 (Thu, 13 May 2010) | 4 lines

  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/branches/1.6.2@262898 65c4cc65-6c06-0410-ace0-fbb531ad65f3

channels/chan_console.c

index 9f212ff6f7ec626d10c8a92cd29bd1e0ade43fe1..4b278412a4ee10209c3cb1023869e3d54757f001 100644 (file)
@@ -1199,7 +1199,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;
        }