[Freeswitch-svn] [commit] r1616 - freeswitch/trunk/src

mikej at freeswitch.org mikej at freeswitch.org
Tue Jun 13 17:41:16 EDT 2006


Author: mikej
Date: Tue Jun 13 17:41:16 2006
New Revision: 1616

Modified:
   freeswitch/trunk/src/switch_console.c

Log:
fix off by 1 in console cmd handling.  Thanks trixter for identifying this.

Modified: freeswitch/trunk/src/switch_console.c
==============================================================================
--- freeswitch/trunk/src/switch_console.c	(original)
+++ freeswitch/trunk/src/switch_console.c	Tue Jun 13 17:41:16 2006
@@ -198,7 +198,7 @@
 		}
 
 		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';



More information about the Freeswitch-svn mailing list