[asterisk-commits] russell: trunk r262897 - /trunk/channels/chan_console.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Thu May 13 10:36:15 CDT 2010


Author: russell
Date: Thu May 13 10:36:12 2010
New Revision: 262897

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=262897
Log:
Fix an off by one error that causes a crash.

Thanks to Raymond Burke for pointing it out.

Modified:
    trunk/channels/chan_console.c

Modified: trunk/channels/chan_console.c
URL: http://svnview.digium.com/svn/asterisk/trunk/channels/chan_console.c?view=diff&rev=262897&r1=262896&r2=262897
==============================================================================
--- trunk/channels/chan_console.c (original)
+++ trunk/channels/chan_console.c Thu May 13 10:36:12 2010
@@ -1196,7 +1196,7 @@
 		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;
 	}




More information about the asterisk-commits mailing list