forked from Mirrors/freeswitch
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
This commit is contained in:
parent
76dfa310c0
commit
6a98739f2e
@ -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';
|
||||
|
Loading…
Reference in New Issue
Block a user