]> git.ipfire.org Git - thirdparty/freeswitch.git/commitdiff
fix off by 1 in console cmd handling. Thanks trixter for identifying this.
authorMichael Jerris <mike@jerris.com>
Tue, 13 Jun 2006 21:41:16 +0000 (21:41 +0000)
committerMichael Jerris <mike@jerris.com>
Tue, 13 Jun 2006 21:41:16 +0000 (21:41 +0000)
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1616 d0543943-73ff-0310-b7d9-9358b9ac24b2

src/switch_console.c

index 4a60cb15c635da65f1e30e9e074f5aeb93b79427..880c3e1448c68cde5c6145c100fd71ff2d70cc07 100644 (file)
@@ -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';