From 6a98739f2e4ab7b569113e99f5f83d4277ce88be Mon Sep 17 00:00:00 2001
From: Michael Jerris <mike@jerris.com>
Date: Tue, 13 Jun 2006 21:41:16 +0000
Subject: [PATCH] fix off by 1 in console cmd handling.  Thanks trixter for
 identifying this.

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1616 d0543943-73ff-0310-b7d9-9358b9ac24b2
---
 src/switch_console.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/switch_console.c b/src/switch_console.c
index 4a60cb15c6..880c3e1448 100644
--- a/src/switch_console.c
+++ b/src/switch_console.c
@@ -198,7 +198,7 @@ SWITCH_DECLARE(void) switch_console_loop(void)
 		}
 
 		memset(&cmd, 0, sizeof(cmd));
-		for (x = 0; x < sizeof(cmd); x++) {
+		for (x = 0; x < (sizeof(cmd)-1); x++) {
 			cmd[x] = (char) getchar();
 			if (cmd[x] == '\n') {
 				cmd[x] = '\0';